Last active
March 19, 2019 12:18
-
-
Save vctrtvfrrr/93816b9aab4e926b0ebb8082b4825e75 to your computer and use it in GitHub Desktop.
Generate SSH Key and SSH Autologin
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
# Generate SSH Key | |
ssh-keygen -t rsa -C "" -b 4096 | |
# SSH Autologin | |
ssh USER@SERVER mkdir -p /path_to_remote/.ssh | |
cat /path_to_my/.ssh/id_rsa.pub | ssh USER@SERVER 'cat >> /path_to_remote/.ssh/authorized_keys' | |
ssh USER@SERVER "chmod 700 /path_to_remote/.ssh && chmod 640 /path_to_remote/.ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment