Configuring Automatic login with SSH

From Provider Wiki

Jump to: navigation, search

If you SSH into a remote machine on a regular basis, the following instructions will allow you to login securely without a password.

  1. Look in your ~/.ssh directory. There should be two files, id_rsa and id_rsa.pub. If not, create them using "ssh-keygen -t rsa".
  2. Append your local id_rsa.pub to the remote host's ~/.ssh/authorized_keys.
    • If the file authorized_keys does not exist, create it with your favorite text editor.
    • To append your public key to the file, simply copy the contents and paste it into authorized_keys on the remote macine.
  3. The file mode of ~/.ssh/authorized_keys must be 644. You can assure this with chmod 644 ~/.ssh/authorized_keys
  4. For this to work, you might have to change your /etc/sshd_config and add the following lines:
    • RSAAuthentication yes
    • Note: in OSX, this line just needs to be uncommented, and changed from "no" to "yes"
Personal tools