Last active
October 26, 2015 10:10
-
-
Save saeidzebardast/04d1abae508fd0eb210a to your computer and use it in GitHub Desktop.
Copy SSH Public Key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat ~/.ssh/id_rsa.pub | ssh <user>@<host> "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" && echo "done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, the ssh-copy-id command (in the openssh-client package and installed by default in Ubuntu) does exactly same:
ssh-copy-id @