Skip to content

Instantly share code, notes, and snippets.

@enjoylife
Created November 8, 2012 22:33
Show Gist options
  • Save enjoylife/4042264 to your computer and use it in GitHub Desktop.
Save enjoylife/4042264 to your computer and use it in GitHub Desktop.
Password-less SSH
1. Generate keys on local machine: `ssh-keygen`
2. Create `~/.ssh` directory on remote machine
3. Copy `local:~/.ssh/id_rsa.pub` to `user@remote:~/.ssh/authorized_keys`
method a) `ssh-copy-id -i ~/.ssh/id_rsa.pub user@host`
method b) cat .ssh/id_rsa.pub | ssh user@host 'cat >> .ssh/authorized_keys'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment