Skip to content

Instantly share code, notes, and snippets.

@quyenlv
Last active July 1, 2020 06:34
Show Gist options
  • Save quyenlv/00ee99d42108b1f7bd1c0dce0c611748 to your computer and use it in GitHub Desktop.
Save quyenlv/00ee99d42108b1f7bd1c0dce0c611748 to your computer and use it in GitHub Desktop.
Automated and passwordless SSH logins

Create the RSA Key Pair

ssh-keygen -t rsa

Copy the public key to a server

ssh-copy-id user@server

Test to establish SSH connection to that server without entering password

ssh user@server

When things went wrong, try to fix permission

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
chmod go-w ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment