Skip to content

Instantly share code, notes, and snippets.

@MattWohler
Last active March 10, 2016 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattWohler/90f4201fcd8483e8f0ea to your computer and use it in GitHub Desktop.
Save MattWohler/90f4201fcd8483e8f0ea to your computer and use it in GitHub Desktop.
How To Set Up SSH Keys

How To Set Up SSH Keys

Step One—Create the RSA Key Pair

Create the key pair on the client machine:

ssh-keygen -t rsa

Step Two—Copy the Public Key

Once the key pair is generated, place the public key on the virtual server:

cat ~/.ssh/id_rsa.pub | ssh user@123.45.56.78 "cd ~/.ssh && cat >> ~/.ssh/authorized_keys"

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