Linux: no password setup of ssh
Here are the steps requires so you can ssh to another machine without needing to type in the password each time. Here I assume that both machines have the same username.
Here $newmachine, $oldmachine, and $user are variables.
Here $newmachine, $oldmachine, and $user are variables.
- ssh-keygen -t rsa
(enter, enter, enter) -- i.e. no passphrase - ssh $newmachine
(enter your password) - cd ~/.ssh
- scp $oldmachine:/home/$yourname/.ssh/id_rsa.pub tmp.pub
- cat tmp.pub >> authorized_keys
- chmod og-rwx authorized_keys
- rm tmp.pub
- exit
- ssh $newmachine
(look ma, no password)
Comments