


In that case, see the Troubleshooting section. It should say something like:Īuthenticating with public key for key _ Now try and see if you can logon via PuTTY with your private key. Make the directory ~/.ssh readable for only you and remove the executable bit from the authorized_keys file:ĪuthorizedKeysFile %h/.ssh/authorized_keys Do not copy and paste that but paste it as it showed it to you just after generation in the “Public key for pasting into OpenSSH authorized keys file” field.
#Putty ssh key login generator#
Note that PuTTY Key Generator saves the key as a file with the key divided into multiple lines. In that file paste the string you copied from PuTTY Key Generator on one single line. Log on as your regular user (not root) and create a file ~/.ssh/authorized_keys. You can also have PuTTY remember your username by entering it under Connection > Data > Auto-login username. Don’t mind the key error just yet, we still need to configure that. Press “Load” and login to your server through regular password authentication. Press “Browse” and select the private key you saved earlier. In the options tree on the left side choose Connection > SSH > Auth. “My Server” – in this case my server is called ubuserv06). Under “Host Name (or IP address)” enter the name or the ip address of your server and under “Saved Sessions” enter the name of the profile you’re creating (e.g. Now close PuTTY Key Generator and start PuTTY. If you lose the file you might lock yourself out of your server. Press “Save private key” and save the file in a location only accessible to you.

The extension of this file doesn’t matter. Press “Save public key” and save the file where you can find it. In the “Key passphrase” field enter a hard password. Include “ssh-rsa” and the e-mail address. Save them somewhere, no installation is necessary.Įxecute puttygen.exe and click the Generate button.Įnter your e-mail address in the “Key comment” field.Ĭopy ALL text under “Public key for pasting into OpenSSH authorized_keys file”. Generate a key pairĭownload PuTTY and PuTTY Key Generator from.
#Putty ssh key login how to#
Several tutorials were helpful in explaining what to do but in the end I figured out how to go about it. Partly because I didn’t know what exactly I was doing but mostly because I didn’t know how to do it. This week I had a really hard time getting public key authentication to work with my Ubuntu 12.04 server.
