Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@saeidzebardast
Last active October 26, 2015 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saeidzebardast/04d1abae508fd0eb210a to your computer and use it in GitHub Desktop.
Save saeidzebardast/04d1abae508fd0eb210a to your computer and use it in GitHub Desktop.
Copy SSH Public Key
cat ~/.ssh/id_rsa.pub | ssh <user>@<host> "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" && echo "done."
@saeidzebardast
Copy link
Author

Also, the ssh-copy-id command (in the openssh-client package and installed by default in Ubuntu) does exactly same:
ssh-copy-id @

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment