ssh key pairs between Putty and CentOS 5.1 server not going so great

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Here is what I've done:

On linux box:
1) log into the linux server with my user account
2) run "ssh-keygen" which creates ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub
3) run "cat ~/.ssh/id_rsa.pub > ~/.ssh/authorised_keys2"

I then copied ~/.ssh/id_rsa to my Windows box via sftp, and did this:

1) opened the id_rsa file in Puttygen, which prompted for the password I added during step 2 above.
2) saved the private key file to my desktop as id_rsa.ppk
3) opened Putty, chose the id_rsa.ppk file under Connection > ssh > auth and connected to the server with my regular user account.

This is when I get the "Server refused our key" message and then asks for my regular user account password instead of my key's password.
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
oops, found it.

looking through the ssh config file, the "authorized key" file should be "authorized_keys" and not "authorised_keys2" (which is what a website I found said to name it).
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
Originally posted by: Brazen
oops, found it.

looking through the ssh config file, the "authorized key" file should be "authorized_keys" and not "authorised_keys2" (which is what a website I found said to name it).
*facepalm* ;)