Skip to content

Instantly share code, notes, and snippets.

@vctrtvfrrr
Last active March 19, 2019 12:18
Show Gist options
  • Save vctrtvfrrr/93816b9aab4e926b0ebb8082b4825e75 to your computer and use it in GitHub Desktop.
Save vctrtvfrrr/93816b9aab4e926b0ebb8082b4825e75 to your computer and use it in GitHub Desktop.
Generate SSH Key and SSH Autologin
# 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