Skip to content

Instantly share code, notes, and snippets.

@anavdesign
Last active March 6, 2023 10:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anavdesign/391a0b3dbe4492d2fc2267f942a530e6 to your computer and use it in GitHub Desktop.
Save anavdesign/391a0b3dbe4492d2fc2267f942a530e6 to your computer and use it in GitHub Desktop.
SSH: Generate SSH Keys

SSH Keys

Resources


  1. Change Directory

    $ cd ~/.ssh
    
  2. Make Property Directory

    $ mkdir DIR_NAME
    
  3. Creates a new ssh key

    # Use Email as a label
    ssh-keygen -t rsa -C email@domain.com
    
  4. Create in property directory created in earlier

    /Users/andesign/.ssh/DIR_NAME/id_rsa
    
  5. Enter Passphrase

    • Strongly recommend a very good, secure passphrase
  6. Ensure ssh-agent is enabled

    eval 'ssh-agent' -s
    
  7. Add Private Key to Mac OSX Keychain

    $ ssh-add -K ~/.ssh/id_rsa
    
  8. Copy id_rsa.pub to your clipboard

    $ pbcopy < ~/.ssh/id_rsa.pub
    
  9. Add your SSH key to your External Account or Host

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