Skip to content

Instantly share code, notes, and snippets.

@jamieoliver
Created March 9, 2014 16:46
Show Gist options
  • Save jamieoliver/9450547 to your computer and use it in GitHub Desktop.
Save jamieoliver/9450547 to your computer and use it in GitHub Desktop.
Copy public key for the current user to a remote host.
ssh <user>@<host> 'mkdir -p .ssh'
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