Skip to content

Instantly share code, notes, and snippets.

@chirag64
Last active August 29, 2015 13:56
Show Gist options
  • Save chirag64/9216145 to your computer and use it in GitHub Desktop.
Save chirag64/9216145 to your computer and use it in GitHub Desktop.

Scenario: Connect from Laptop to Desktop using SSH without password prompt.

  1. Login to Laptop terminal.

  2. Make sure there is a .ssh directory in home folder of user and that it is only accessible to the user:

mkdir ~/.ssh
chmod 700 ~/.ssh
  1. Generate SSH keys (using RSA algorithm in this case):
ssh-keygen -t rsa
  1. This will generate the files ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub. Copy the id_rsa.pub on the Desktop as ~/.ssh/authorized_keys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment