Last active
November 3, 2016 13:40
-
-
Save 0xBADC0FFEE/fdeff35fca08060b88bbf56895b31767 to your computer and use it in GitHub Desktop.
Set Up SSH Keys
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
# local | |
cat ~/.ssh/id_rsa.pub | ssh user@ip "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" | |
# remote | |
chmod 700 ~/.ssh | |
chmod 600 ~/.ssh/authorized_keys | |
# both | |
cat ~/.ssh/id_rsa.pub | ssh user@ip "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment