Skip to content

Instantly share code, notes, and snippets.

@slhogle
Last active September 9, 2020 18:47
Show Gist options
  • Select an option

  • Save slhogle/8a82e784e3a03ffd062027995cc3d59f to your computer and use it in GitHub Desktop.

Select an option

Save slhogle/8a82e784e3a03ffd062027995cc3d59f to your computer and use it in GitHub Desktop.
SSH key pairing

create private/public key combo

  1. ssh-keygen -b 2048 -f mykeyname
  2. create password

append public key to remote host

  1. SSH to remote host
  2. cd to ~/.ssh
  3. append contents of public key file (mykeyname_rsa.pub) to ~/.ssh/authorized_keys

add to ssh-agent

  1. if ssh-agent not running already run eval ssh-agent.
  2. ssh-add [mykeyname]
  3. enter password from above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment