Skip to content

Instantly share code, notes, and snippets.

@janaSunrise
Created November 13, 2020 04:44
Show Gist options
  • Save janaSunrise/07ec49fa15dc0f2001a416c57e015015 to your computer and use it in GitHub Desktop.
Save janaSunrise/07ec49fa15dc0f2001a416c57e015015 to your computer and use it in GitHub Desktop.
This snippet of code, allows you to add Key based Passwordless authentication for your server connections.
ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub -p 22 user@host
@janaSunrise
Copy link
Author

Note for everyone ⚠️

  • Be sure to replace the user placeholder with the server username, and host with the server IP Address.
  • You have to change the -i flag value to the key destination, If you have saved your Keys somewhere else.
  • You have to change the -p value with the new port address, If you have changes the default SSH port

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment