Monday, November 27, 2006

SSH without password

1 ssh-keygen -t rsa

This will generate the pub key and private keys

Now copy the id_rsa.pub to the .ssh directory of the remote host you want to logon to as authorized_keys

2 scp id_rsa.pub:.ssh/authorized_keys

that'a all

Now try to login the remote server as

3 ssh It should not ask you a password.

For more details refer to

http://www.cs.umd.edu/~arun/misc/ssh.html

The correct command for copying pub key is scp id_rsa.pub Remote Server Name :.ssh/authorized_keys

1 comment:

ankurtade said...

The correct command for copying pub key is
scp id_rsa.pub Remote Server Name :.ssh/authorized_keys