Sunday, April 19, 2009

Passwordless login using SSH

To login to machine b from machine a:

On machine a run 'ssh-keygen -t rsa'
Hit return for the passphrase (leave it empty)
Copy id_rsa.pub to b:.ssh/a.key
Login to machine b
cd .ssh
cat a.key >> authorized_keys

1 comment:

  1. This shell script can help (on the "from" machine):

    njh@packard:~/bin$ cat setupssh
    # ssh-keygen -t rsa
    ssh -C $1 "cat >> ~/.ssh/authorized_keys" < ~/.ssh/id_rsa.pub
    njh@packard:~/bin$

    ReplyDelete