Saturday, May 31, 2008
Finicky ssh: ssh keypairs for password-less login
I use cygwin to connect to remote linux machine. Yeah, call me a hypocrite, who likes command-line, yet sticks to XP.
You can learn about setting up keypairs here.
After generating key pairs, I copied the public key to remotehost:/home/myusername/.ssh/authorized_keys. And it failed to work. The trick I had to use is the correct perms for .ssh directory and authorized_keys. The .ssh directory requires perms of 700 and authorized_keys 600. You can check /var/log/secure (on FC distro, dunno about others) to see the log.
Now, it is working fine.
You can learn about setting up keypairs here.
After generating key pairs, I copied the public key to remotehost:/home/myusername/.ssh/authorized_keys. And it failed to work. The trick I had to use is the correct perms for .ssh directory and authorized_keys. The .ssh directory requires perms of 700 and authorized_keys 600. You can check /var/log/secure (on FC distro, dunno about others) to see the log.
Now, it is working fine.
Labels: ssh
Subscribe to Posts [Atom]