Skip to content

Instantly share code, notes, and snippets.

@leonardfactory
Created May 18, 2013 19:40
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 leonardfactory/5605549 to your computer and use it in GitHub Desktop.
Save leonardfactory/5605549 to your computer and use it in GitHub Desktop.
How to add SSH PublicKey login to your server, stringed procedure

#How to add SSH PublicKey login to your server

  • ssh-keygen
  • Use no passphrase, use custom file like my_identity_rsa + my_identity_rsa.pub
  • port install ssh-copy-id
  • ssh-copy-id -i my_identity_rsa.pub root@server // It takes care of everything like permissions etc.
  • chmod g-w,o-w ~ // Ensure home directory is not writable by others and groups.
  • ssh-add my_identity_rsa // Let me use this key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment