Skip to content

Instantly share code, notes, and snippets.

@glennposadas
Forked from mimukit/SSH key setup.md
Created August 18, 2024 05:14
Show Gist options
  • Select an option

  • Save glennposadas/df9ca7063d3dcab7aa2d22bdfada7cf0 to your computer and use it in GitHub Desktop.

Select an option

Save glennposadas/df9ca7063d3dcab7aa2d22bdfada7cf0 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