LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Passwordless SSH login (https://www.linuxquestions.org/questions/linux-general-1/passwordless-ssh-login-683419/)

triley 11-14-2008 01:16 PM

Passwordless SSH login
 
Hello,

I have three systems, two running CentOS5.2, 32-bit and the third running CentOS5.2, 64-bit. I am trying to set up passwordless SSH logins between the three systems. Using SSH-KEYGEN I created a public and private rsa key on each system. I copied the public keys to a master AUTHORIZED_KEYS file and then distributed that file to all three machines in /home/<user>/.ssh/authorized_keys. The two CentOS5.2 32-bit systems can ssh into each other without having to enter a password. I can also ssh into the 32-bit CentOS systems from the 64-bit CentOS system without having to enter a password. However, when I try to ssh into the 64-bit system from either 32-bit system, I am prompted for a password. All three systems are running ssh protocol 2 and the sshd_config files are identical. SELinux is enabled, but it is enabled on all three systems. IPtables is disabled on all three systems. Any thoughts on why I keep getting prompted for a password? Thanks.

triley 11-14-2008 01:38 PM

For anyone else having a similar problem, I had to set permissions on /home/<user>/.ssh to 755...

1. su -
2. cd /home/<user>
3. chmod 755 .ssh

triley 11-14-2008 02:01 PM

/home/<user>/.ssh should be set to 700 NOT 755.

billymayday 11-14-2008 03:07 PM

ssh is very sensitive to permissions. I was on a thread recently where it didn't work properly because the permissions on the users home (/home/user) were 755 or similar.


All times are GMT -5. The time now is 04:40 AM.