Guest User

Untitled

a guest
Nov 23rd, 2017
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # SSH Keys Generation
  2.  
  3. ### Checking for existing SSH keys first
  4. ```TXT
  5. ls -al ~/.ssh
  6. ```
  7.  
  8. ### Generating a new SSH key
  9. ```TXT
  10. ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
  11. ```
  12.  
  13. ### Adding your SSH key to the ssh-agent
  14. ```TXT
  15. eval "$(ssh-agent -s)"
  16. ```
  17.  
  18. ### Add your SSH private key to the ssh-agent and store your passphrase in the keychain
  19. ```TXT
  20. ssh-add -K ~/.ssh/id_rsa
  21. ```
  22.  
  23. ### Adding a new SSH key to your GitHub account
  24. ```TXT
  25. pbcopy < ~/.ssh/id_rsa.pub
  26. ```
  27.  
  28. ### If it doesn’t work (do not copy it) use:
  29.  
  30. ```TXT
  31. cat git_rsa.pub
  32. ```
  33.  
  34. This will list the key, then just copy it and paste into the deploy key on the GitHub repo
Add Comment
Please, Sign In to add comment