0 votes
by (120 points)

I've generated a private/public key pair using PuTTY key generator, but it keeps failing to load the public key with the following error:

User public key 'S:...' could not be loaded: Unsupported key at line at line 1.

Below is the content of the public key file:

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20180522"
AAAAB3NzaC1yc2EAAAABJQAAAQEAmNbXgp0nffCa4pPEbV8+lI6/5kQFflfzfnc8
I5lc5BGxoKBiueyb8jnG29NtzZyNsh7ImR6Eaq6xyCoW0KY42EJPmZbJySBFcqJr
3Mv55B3ltHsRjWqM5c2gsIbTCkhW5gblY+PSgpKX/ohfpSB2MA3BH1rlwdxNMguY
G/wyqloflqEhLBfj/h1CQUeU8Fr4w2IfLEe7WziFEsdxaOusvJ1yZ/AQJhUT1Eb8
AnMeOX/EJmepR/s6aJzYWkJbKd3/YL8SCL9NY0X++3g1zIm7eiNq2QtmG+OxDELp
4EqYBhm5qxQYzQ3peH3ByitmvKMG4M0GnZgkrrI4H1wTuuIoAQ==
---- END SSH2 PUBLIC KEY ----

1 Answer

0 votes
by (73.6k points)
edited by

UPDATE:

The issue was fixed in version 1.0.5 (see Version History).


Thank you for pointing to this issue.

This is change in version 1.0.4, which now requires ~/.ssh/authorized_keys file format. However, we considered this as unwanted change and we will add automatic detection of the format.

If you want to use version 1.0.4 please, convert your public key to:

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAmNbXgp0nffCa4pPEbV8+lI6/5kQFflfzfnc8I5lc5BGxoKBiueyb8jnG29NtzZyNsh7ImR6Eaq6xyCoW0KY42EJPmZbJySBFcqJr3Mv55B3ltHsRjWqM5c2gsIbTCkhW5gblY+PSgpKX/ohfpSB2MA3BH1rlwdxNMguYG/wyqloflqEhLBfj/h1CQUeU8Fr4w2IfLEe7WziFEsdxaOusvJ1yZ/AQJhUT1Eb8AnMeOX/EJmepR/s6aJzYWkJbKd3/YL8SCL9NY0X++3g1zIm7eiNq2QtmG+OxDELp4EqYBhm5qxQYzQ3peH3ByitmvKMG4M0GnZgkrrI4H1wTuuIoAQ== rsa-key-20180522

Format is: <key-type><space><base64-data><space><comment>
You can specify more keys in one file (one key per line).

...