Skip to content

Instantly share code, notes, and snippets.

@slavama
Last active December 16, 2021 03:46
Show Gist options
  • Save slavama/e020d5fb31e2e9b3aff19cb3f9dcb2a4 to your computer and use it in GitHub Desktop.
Save slavama/e020d5fb31e2e9b3aff19cb3f9dcb2a4 to your computer and use it in GitHub Desktop.
Copy authorized key to remote server for login without password
cat ~/.ssh/id_rsa.pub | ssh REMOTE_USER@REMOTE_IP "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
// ssh-copy-id REMOTE_USER@REMOTE_IP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment