Created
May 1, 2018 05:46
-
-
Save derozic/3f68302d1299094927d753356f58325f to your computer and use it in GitHub Desktop.
Generate keypair, add to MacOS Keychain, Copy to the Clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Author
Author
Setup the server now: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create the keypair, choosing a new passphrase when you do:
ssh-keygen -t rsa -f ~/.ssh/id_rsaAdd the newly minted private key to your MacOS Keychain to store the passphrase and manage unlocking it automagically:
ssh-add -K ~/.ssh/id_rsaCopy the public key to the clipboard for getting busy with web services like GitHub, etc.
cat ~/.ssh/id_rsa.pub | pbcopyAdd your newly minted public key to the ~/.ssh/authorized_keys file of the remote server with correct permissions of both the remote ~/.ssh folder (700) and ~/.ssh/authorized_keys (600). W0rd.