Question

DO+ PuTTY SHH key doesn't work

Posted June 20, 2021 158 views
UbuntuInitial Server Setup

So i followed documentation on how to put SHH via Putty, letter by letter.
I coped “Public key for pasting into OpenSHH authorized_key file” from Putty Key Generator to paste it in my DO account. Double checked if i haven’t missed any part.

I set putty like it was told in documentation for Ubuntu (ip from DO, user: root, dir to my private key in SHH>Auth).

And after i hit open i get “No supported authentication methods available (server sent: publickey).

Remaking new keys doesn’t help.

I have choose DO because using PuTTY and update things looks really easy, but if there are errors from following guide its quite upsetting.

1 comment
  • If you want to do this with windows command prompt first install openssh in windows then

    please read the steps first before following the steps :

    1.In windows cmd prompt: “”“ssh-keygen”“” (this will generate idrsa.pub and idrsa key for windows REMEMBER TO PRESS ENTER WHEN ASKES YOU PASSWORD IF YOU WANT TO SSH TO SERVER WITHOUT PASSWORD)

    2.In windows cmd prompt: “”“scp [location of windows idrsa.pub] [linuxuser]@[linuxIP/linuxhostname]:~/.ssh/authorizedkeys”“” (this will copy windows pub key to linux server, the location of windows idrsa.pub is shown when you gave the cmd ssh-keygen)

    https://linux.org/threads/solved-how-to-ssh-from-windows-to-linux-via-ssh-key.35120/#post-125914

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hello, @demeo1988

No supported authentication methods available (server sent: publickey), it basically says that the server said it supported public key authentication only and PuTTY was not able to provide it. I will recommend you double-check the settings in PuTYY. You can check these tutorials:

https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/create-with-putty/

https://www.digitalocean.com/community/tutorials/how-to-create-ssh-keys-with-putty-to-connect-to-a-vps

You can try copying the key via ssh instead of using PuTTY. You can also use the ssh-copy-id command in order to do so. An example will be:

  • ssh-copy-id -i ~/.ssh/mykey user@host

Hope that this helps!
Regards,
Alex

by Pablo Carranza
This tutorial runs through creating SSH keys with PuTTY to connect to your virtual server.

if you want to do this by windows cmd prompt please read the steps first before typing the cmds:

1.In windows cmd prompt: “ssh-keygen” (this will generate idrsa.pub and idrsa key for windows REMEMBER TO PRESS ENTER WHEN ASKES YOU PASSWORD IF YOU WANT TO SSH TO SERVER WITHOUT PASSWORD)

2.In windows cmd prompt: “scp [location of windows idrsa.pub] [linuxuser]@[linuxIP/linuxhostname]:~/.ssh/authorizedkeys” (this will copy windows pub key to linux server, the location of windows idrsa.pub is shown when you gave the cmd ssh-keygen)

https://linux.org/threads/solved-how-to-ssh-from-windows-to-linux-via-ssh-key.35120/#post-125914