Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Copy SSH Public Key
cat ~/.ssh/id_rsa.pub | ssh <user>@<host> "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" && echo "done."
@saeidzebardast

This comment has been minimized.

Copy link
Owner Author

@saeidzebardast saeidzebardast commented Oct 19, 2015

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