Skip to content

Instantly share code, notes, and snippets.

@Lecarvalho
Last active August 20, 2021 21:12
Show Gist options
  • Save Lecarvalho/4d667261d8bd467cc8bf3696e86eef8d to your computer and use it in GitHub Desktop.
Save Lecarvalho/4d667261d8bd467cc8bf3696e86eef8d to your computer and use it in GitHub Desktop.
Create ssh key
  1. Generate the public and the private keys on local machine (give a name if you need)
ssh-keygen
  1. Copy the content for .pub file

  2. Create a file under $USER/.ssh/authorized_keys on the server if it does not exists yet

  3. Paste the content of the .pub file on the authorized_keys file, save and close the file

  4. Try to connect without the password, juste ssh username@servername -i path_to_key_file

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