Tuesday, October 11, 2005

SSH Public Key Login Problem

I wanted to login to my Mac from my PC using SSH without password, and also the other way around. This is supposed to be easy, i just need to do:

ssh-keygen -t dsa
scp .ssh/id_dsa.pub remote:./ssh/authorized_keys

(repeat the same from the other side).

The PC to Mac connection works on the first try, but not the other way around. After checking my /var/log/secure, I got the hint that I need:

Oct 8 00:33:21 localhost sshd[8703]: Authentication refused: bad ownership or modes for file /home/yohanes/.ssh/authorized_keys

It seems that the umask is set diferently, so I had to do:

chmod 600 ~/.ssh/*

0 Comments:

Post a Comment

<< Home