0

I'm trying to allow another developer to connect to a our ubuntu server and they are getting the below error in FileZilla.

Disconnected: No supported authentication methods available (server sent: publickey)
Could not connect to server

enter image description here

I thought, maybe I added the public key to the ~/.ssh/authorised_keys on the server incorrectly.

She sent me a public key like this called mags_public_key

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "mags-key-20140819"
AAAAB3N????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????
????x?????????????????????????????BKCx1M1S/Mhh3MHw==
---- END SSH2 PUBLIC KEY ----

Which is odd as I'm not used to comments in public keys or line breaks? We've tried using her public key with & witout the comment & line breaks. I've added it to ~/.ssh/authorised_keys like this:

ssh-rsa AAAAB/??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????3cXMJMA8zT
AAAAB3N??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????BKCx1M1S/Mhh3MHw==

It's also strange as it does not begin with ssh-rsa, also her private key is called mags_private.ppk, I think this is because she is using windows & putty. I'm used to adding keys which are called id_rsa.pub

Is their a problem with her public key or do I need to add something to the authorised_keys file. Other devs have been able to ssh in before but they had a id_rsa.pub.

1
  • Let the other developer to export the public key in the openssh format from puttygen
    – Jakuje
    Commented Aug 1, 2016 at 19:42

1 Answer 1

2

The safest way to convert to openssh format without introducing a typo is to have her open her private key in PuTTY's "puttygen" graphical utility. At the top of the dialog box should be a textbox labelled "Public key for pasting into OpenSSH authorized_keys file" which does just what it says.

Alternately, on your system, use ssh-keygen's import option

$ ssh-keygen -i -f file_to_convert > output
2
  • thanks, so does it look like her public key is in the incorrect format? How can you tell? She has told me she has used it many times to connect to a server.
    – Holly
    Commented Aug 1, 2016 at 21:22
  • I used that command you gave me to convert it. It seemed to only remove the line breaks, comment and it prepended ssh-rsa . Hopefully it works, thanks
    – Holly
    Commented Aug 1, 2016 at 21:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .