Before you disable password logins in /etc/ssh/sshd_config test if your key authentication works properly.In the file ~/.ssh/authorized_keys each and every key must be on its own single line.In Ubuntu 12.04 the ssh service is called ssh not sshd.If you’re using encrypted home folders store your authorized keys in a place that is accessible to the system before you logon, for example in /etc/ssh/.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. 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.
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. Follow the below commands.This week I had a really hard time getting public key authentication to work with my Ubuntu 12.04 server.
Install wine if not in your ubuntu device. PuTTYgen is normally installed as part of the normal PuTTY. It supports many network protocols, including SCP, SSH, Telnet, rlogin, and raw socket connection. Putty is mostly a terminal for windows-based operating systems. Putty is an open-source SSH client used to connect to a remote server. PuTTYgen.exe on Windows is a graphical tool. But, the tool can also convert keys too and from other formats. PuTTY saving keys in its owned format in. PuTTYgen is a key generator engine for creating SSH keys for PuTTY. putty-is-installed-on-ubuntu Install Puttygen on Ubuntu it provides a wide range of connection types to choose from Raw, Telnet, Rlogin, SSH and Serial. find-putty-on-your-ubuntuĪs visible in the PuTTY screenshot below, the Linux version of Putty looks the same as the Windows version. Or You can find it in the menu the same as the screenshot below.