git-step-by-step
  • Introduction
  • Git Remote
  • Branch
  • Checkout & Reset
  • SSH Key
  • Branch
  • Diff & Merge
  • Commit
  • Log
  • Rebase
  • Fetch
  • Reflog
  • Tag
  • Stash
  • Configure Sublime for Linux
Powered by GitBook
On this page

Was this helpful?

SSH Key

// default id_rsa // private key id_rsa.pub // public key

ls -l ~/.ssh // list out ssh keys if exists

// Generate Key ( 4096 - length, strong )
ssh-keygen -t rsa 4096 -C "key pair demo"
// C://users/hesing/.ssh/
// enter password if you wish or leave blank if don't need password

// In case later you want to add password to already generated key use
ssh-keygen -p

// Add key to ssh agent
eval "$(ssh-agent -S)"
ssh-add ~/.ssh/id_rsa.pub

// Add SSH key to github
clip < ~/.ssh/id_rsa.pub

// Go to github profile -> settings -> SSH keys ( paste it and save )

// Test connection to github
ssh -T -p 443 git@ssh.github.com // have firewall issues etc then use this

// OR ( generally use this)
ssh -T git@github.com
PreviousCheckout & ResetNextBranch

Last updated 5 years ago

Was this helpful?