Symptoms
Domains > example.com > SSH Keys > Add Key returns the following error:
Incorrect format of SSH public key
Cause
A previous key was saved with an incorrect format in /var/www/vhosts/example.com/.ssh/authorized_keys
. This was probably done via SSH and not via UI.
ssh-ed25519 BBBBBBC3NzaC1lZDI1NTE5AAAAIFW+K5cmRAQUjUtvVJAwqA+xGLam/FTUuOAOMLVIc925
The key is expected to have three space-separated non-whitespace parts (type, key, title):
ssh-ed25519 BBBBBBC3NzaC1lZDI1NTE5AAAAIFW+K5cmRAQUjUtvVJAwqA+xGLam/FTUuOAOMLVIc925 johndoe
Resolution
-
Connect to the server via SSH
-
Since the key is already saved in the file system the following file needs to be edited. Edit file
/var/www/vhosts/example.com/.ssh/authorized_keys
-
Remove the key with the incorrect format and save the file.
-
Verify that the error is gone in Domains > example.com > SSH Keys
Comments
0 comments
Please sign in to leave a comment.