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
Wednesday, February 06, 2008
ssh slow to respond
You are connecting to a local linux machine with ssh, but you have to take a coffee break for the ssh prompt to return. Here is the fix.
On the server change the following.
On the server change the following.
- In /etc/ssh/sshd_config set the following. The first one informs to use IPV4 and second asks not to do any reverse DNS lookups.
AddressFamily inet
UseDNS no - Add the private address of the server to /etc/hosts
Subscribe to Posts [Atom]