Created
March 11, 2017 04:12
-
-
Save traedamatic/2a137278f700dd1155f8ed11f9f5078d to your computer and use it in GitHub Desktop.
Copy SSH key to remote server key-based authentication
This file contains hidden or 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
# replace the id_rsa.pub with your key file and enter the correct HOSTNAMEANDCONFIG information | |
cat ~/.ssh/id_rsa.pub | ssh HOSTNAMEANDCONFIG "mkdir .ssh 2>/dev/null; cat >> ~/.ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment