Renew SSH Public Key

Deletes the old Logpresso SSH public key and generates a new one. This will invalidate Logpresso SSH key-based authentication on all systems you were previously connected to, and you will need to re-register the public key. This operation is irreversible. You need cluster administrator privileges to call this API.

HTTP Request

POST /api/sonar/renew-ssh-public-key
Request using cURL
curl -H "Authorization: Bearer <API_KEY>" \
     -X POST \
     https://HOSTNAME/api/sonar/renew-ssh-public-key

Success Response

{
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCjU/Fx6gogfQDS+egS2ym1c0yill9UkVxZuxpRBqSvh6/xPV24aXaFEywkYCJ0ZJkRyvyJl2FDnyO0ghu9cTRdkNWo+nlHD+LiIbAmglVLOde0I85BLVclXu2HqT8Fd4TIWmUUiIYa1adA96B8qprqKKMCLQwZSqDSNzyRG0/AvQ== "
}
  • public_key (String): Newly generated SSH public key

Error Response

No cluster administrator privileges
{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}