Skip to content

Instantly share code, notes, and snippets.

@Kamensky124
Forked from mimukit/SSH key setup.md
Created March 31, 2023 14:02
Show Gist options
  • Save Kamensky124/ffe3e24e5767db4facd22e7dda985384 to your computer and use it in GitHub Desktop.
Save Kamensky124/ffe3e24e5767db4facd22e7dda985384 to your computer and use it in GitHub Desktop.
Quick guide for SSH setup on macOS
  1. Setup ssh key on your pc (skip this step if you already have it)

    ssh-keygen -t rsa -b 4096 -C "[email protected]"
    
    • Start the ssh-agent in the background.
    eval "$(ssh-agent -s)"
    
    • Add your SSH private key to the ssh-agent and store your passphrase in the keychain.
    ssh-add -K ~/.ssh/id_rsa
    
  2. Copy ssh key to clipboard

    • Run the command below to copy the ssh key to your clipboad
    pbcopy < ~/.ssh/id_rsa.pub 
    
  3. Test github setup

    • Run the command below to terminal
    ssh -T [email protected]
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment