Take a look at your ~/.ssh/authorized_keys file - if the key you added looks like
Code:
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20130807"
AAAAB3NzaC1yc2EAAAABJQAAAIB53EZqGv0K6IfZL1yPmzB1k7iVuYN6Y4tHnIpz
On+5DYF85j7uLDmtlCbSU0pN7Q2t6CzlVcBF2y8f8LcsZ5eikORx+1aMC/xCXOPs
rdlDnLYrlbKx3EmJsZ1Ma9Dyl3eYj9i2vSeabX4xI0xvS5GGFHv8F2Au6TFkuT/f
rfB9Hw==
---- END SSH2 PUBLIC KEY ----
then it is in the wrong format for OpenSSH, usually meaning that you saved the PuTTY key to a file and copied that across, instead of copy-pasting the key from the area at the top of the PuTTYgen dialog box or using the 'Export OpenSSH key' option
Code:
Public key for pasting into OpenSSH authorized_keys file
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIB53EZqGv0K6IfZL1yPmzB1k7iVuYN6Y4tHnIpzOn+5DYF85j7uLDmtlCbSU0pN7Q2t6CzlVcBF2y8f8LcsZ5eikORx+1aMC/xCXOPsrdlDnLYrlbKx3EmJsZ1Ma9Dyl3eYj9i2vSeabX4xI0xvS5GGFHv8F2Au6TFkuT/frfB9Hw== rsa-key-20130807
Apart from that, the server knows what location to look for the authorized_keys file based on the entry in the /etc/ssh/sshd_config file:
Code:
AuthorizedKeysFile %h/.ssh/authorized_keys
You shouldn't need to mess with the location unless you are using an encrypted home directory.
Alternatively, you can generate the key pair on the Ubuntu side using ssh-keygen (which will guarantee the key is in the correct format) and then import it into PuTTY on the Windows machine
Bookmarks