ssh-keygen RSA DSA keys don't seem to work
| Topic ID: 2831 | |
| Created By: | 2007-DEC-28 16:31:15 [Vitaliy] |
| Updated By: | 2007-DEC-28 16:31:15 [Vitaliy] |
| Status: | Open |
| Severity: | Normal |
| Read Only: | No |
|
8645
2007-DEC-28 16:31:15
|
||||
|
Issue
You are trying to setup password-less SSH authentication using RSA/DSA keys: client - host from which you'd like to connect to a server server - host to which you'd like to connect from a client You've properly setup your private/public keys on the client using "ssh-keygen" command the pairs are saved in $HOME/.ssh/ : client-> ls -l -rw------- 1 oracle oinstall 668 Jun 15 2007 id_dsa -rw-r--r-- 1 oracle oinstall 605 Jun 15 2007 id_dsa.pub -rw------- 1 oracle oinstall 883 Jun 15 2007 id_rsa -rw-r--r-- 1 oracle oinstall 225 Jun 15 2007 id_rsa.pub You then copied *.pub keys over to the server saving it in the $HOME/.ssh/authorized_keys : server-> ls -l total 16 -rw------- 1 oracle oinstall 2523 Dec 28 15:49 authorized_keys Now you are trying to ssh server from the client but it continues to prompt you for the password.
SOLUTION
Fix the home directory permissions on the server: [root@server ~]# ls -l /u01/app total 12 drwxrwxr-x 7 oracle oinstall 4096 Dec 28 01:37 oracle [root@server ~]# chmod 700 /u01/app/oracle/ [root@server ~]# ls -l /u01/app total 12 drwx------ 7 oracle oinstall 4096 Dec 28 01:37 oracle [root@server ~]# REFERENCE: http://forums.fedoraforum.org/archive/index.php/t-30684.html