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.
  1. ssh-keygen -t rsa
    (enter, enter, enter) -- i.e. no passphrase
  2. ssh $newmachine
    (enter your password)
  3. cd ~/.ssh
  4. scp $oldmachine:/home/$yourname/.ssh/
  5. cat >> authorized_keys
  6. chmod og-rwx authorized_keys
  7. rm
  8. exit
  9. ssh $newmachine
    (look ma, no password)


Anonymous said…
Thanks you just saved my bacon! I'm working on a RED HAT Oracle RAC and I need no password ssh ! Thanks again!

Popular posts from this blog

Shortest Sudoku solver in Python

Seven Segment Display in Inkscape