SlideShare a Scribd company logo
Setting up Github and SSH Keys
SSH Key
• When working with a GitHub repository, you'll often need to identify
yourself to GitHub using your username and password.
• An SSH key is an alternate way to identify yourself that doesn't require you
to enter you username and password every time.
• SSH keys come in pairs, a public key that gets shared with services like
GitHub, and a private key that is stored only on your computer. If the keys
match, you're granted access.
• The cryptography behind SSH keys ensures that no one can reverse
engineer your private key from the public one.
SSH Key
• Using the SSH protocol, you can connect and authenticate to remote
servers and services. With SSH keys, you can connect to GitHub
Enterprise without supplying your username or password at each visit.
Checking Existing key
• Before you generate an SSH key, you can check to see if you have any
existing SSH keys.
• Command to check an existing key is:
$ ls –al ~/.ssh
Note: I am executing this command in
git bash
Checking Existing Key
• SSH keys are stored under .ssh
folder and by typing ~/.ssh you
have specified the relative path
of the key.
• I have a key already created in
2019. So the output looks like
this.
Generating a new SSH key
• If you don't have an existing public and private key pair, or don't wish to
use any that are available to connect to GitHub Enterprise, then generate a
new SSH key.
• Command is:
$ ssh-keygen -t rsa -b 4096 -C „mukesh.27406@lpu.co.in"
• Last argument is your github registered email ID.
Just press enter key leaving it with default file name.
• If you have an existing SSH key, it will ask the permission to overwrite, I
have chosen “yes” for overwriting.
• Next git bash prompts you for a pass phrase. Enter a simple and
memorable passphrase. (Note: while typing and retyping the passphrase,
it remains invisible)
• You can leave it empty i.e. no passphrase
• After entering passphrase, gitbash will produce and show output as in
next screen.
Setting up github and ssh keys.ppt
• It has saved identification at /c/Users/Mandeep/.ssh/id_rsa
• It has saved public key at /c/Users/Mandeep/.ssh/id_rsa.pub
• It has generated a key fingerprint as:
SHA256:dXzvWP3GysUzieTkA1R6ydz/j8v1213K0m7hy9Y//mM mandeep.13695@lpu.co.in
• It has generated a key's randomart image
Adding your SSH key to the ssh-agent
• The ssh-agent is a helper program that keeps track of user's identity
keys and their passphrases.
• The agent can then use the keys to log into other servers without
having the user type in a password or passphrase again.
• This implements a form of single sign-on (SSO).
• The SSH agent is used for SSH public key authentication.
• It uses SSH keys for authentication.
• Users can create SSH keys using the ssh-keygen command and
install them on servers using the ssh-copy-id command.
Setting up github and ssh keys.ppt
• Add your SSH private key to the ssh-agent. If you created your key with a
different name, or if you are adding an existing key that has a different
name, replace id_rsa in the command with the name of your private key
file.
$ ssh-add ~/.ssh/id_rsa
• It will ask for your passphrase, after entering passphrase you will see
following output.
Setting up github and ssh keys.ppt
Adding a new SSH key to your GitHub account
• To configure your GitHub Enterprise account to use your new (or
existing) SSH key, you'll also need to add it to your GitHub Enterprise
account
• After adding a new SSH key to your GitHub Enterprise account, you
can reconfigure any local repositories to use SSH.
• Copy the SSH key to your
clipboard.
• If your SSH key file has a
different name than the
example code, modify the
filename to match your
current setup. When copying
your key, don't add any
newlines or whitespace.
$ clip < ~/.ssh/id_rsa.pub
• Got to your
github account
and open
settings.
• Open SSH
and GPG
keys
• Click on new SSH
key button
• Enter a descriptive
title.
• Paste the contents
from clipboard.
(Note: Pasting the
contents have to be the
very next step after clip
command)
• Click on Add SSH key
button.
(Note: you may have to
delete the existing SSH
keys associated with
your account)
• After you've set up your
SSH key and added it to
your GitHub Enterprise
account, you can test
your connection.
• Command is:
$ ssh –T git@<hostname>
Testing SSH Key
• Practice this and discuss your problems and doubts using LPU live
app.

More Related Content

PPTX
Blockchain for healthcare
PPTX
Message Authentication using Message Digests and the MD5 Algorithm
PPTX
Raspberry pi
PDF
IPSec (Internet Protocol Security) - PART 1
PPTX
Presentation on Raspberry Pi by Sazzad H. IIUC
PDF
01 - Introduction to Hyperledger : A Blockchain Technology for Business
PPTX
Bitcoin & Bitcoin Mining
PDF
Network Security_Module_2.pdf
Blockchain for healthcare
Message Authentication using Message Digests and the MD5 Algorithm
Raspberry pi
IPSec (Internet Protocol Security) - PART 1
Presentation on Raspberry Pi by Sazzad H. IIUC
01 - Introduction to Hyperledger : A Blockchain Technology for Business
Bitcoin & Bitcoin Mining
Network Security_Module_2.pdf

What's hot (20)

PPTX
Wi-gig
PDF
C mcq practice test 4
PPTX
Raabit and bacteria
PPTX
Blockchain .pptx
PDF
Computer_1000_Most_Repeated_MCQs_by_TestPoint.pk_.pdf
PDF
Blockchain
PPTX
Raspberry Pi Introduction
PPSX
PDF
5G: The Evolution and Tech Trends Today
PPTX
Presentation on Gi-Fi
PPTX
Blockchain in Healthcare
PDF
Hybrid Memory Cube: Developing Scalable and Resilient Memory Systems
PPTX
Raspberry pi
PDF
The State of Decentralized Storage
PPTX
CS8792 - Cryptography and Network Security
PPTX
I2C Protocol
PPTX
4G 5G technology
PDF
Functional verification techniques EW16 session
Wi-gig
C mcq practice test 4
Raabit and bacteria
Blockchain .pptx
Computer_1000_Most_Repeated_MCQs_by_TestPoint.pk_.pdf
Blockchain
Raspberry Pi Introduction
5G: The Evolution and Tech Trends Today
Presentation on Gi-Fi
Blockchain in Healthcare
Hybrid Memory Cube: Developing Scalable and Resilient Memory Systems
Raspberry pi
The State of Decentralized Storage
CS8792 - Cryptography and Network Security
I2C Protocol
4G 5G technology
Functional verification techniques EW16 session
Ad

Similar to Setting up github and ssh keys.ppt (20)

PDF
Github add ssh key
PDF
SSH how to 2011
PPTX
Creating SSH Key.pptx
PDF
SSH.pdf
DOCX
Git bash
DOCX
Git bash
DOCX
Git bucketGit bash
DOCX
Git bashGit bucket
DOCX
ffdfdfdfGit bash
DOCX
Git bucketGit bash
PPTX
Ligthning Talk - Secure your keys: ssh-resident-keys
PPTX
Introduction to git and github
PDF
Git Workshop : Git On The Server
PDF
tutorial-ssh.pdf
DOCX
Software Instructions
PDF
PDF
An introduction to SSH
PPTX
PDF
introductiontogitandgithub-120702044048-phpapp01.pdf
PDF
Windowshadoop
Github add ssh key
SSH how to 2011
Creating SSH Key.pptx
SSH.pdf
Git bash
Git bash
Git bucketGit bash
Git bashGit bucket
ffdfdfdfGit bash
Git bucketGit bash
Ligthning Talk - Secure your keys: ssh-resident-keys
Introduction to git and github
Git Workshop : Git On The Server
tutorial-ssh.pdf
Software Instructions
An introduction to SSH
introductiontogitandgithub-120702044048-phpapp01.pdf
Windowshadoop
Ad

More from Lovely Professional University (20)

PPTX
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
PPTX
Effort Estimation: Meaning, Problems with Estimation, Basis, Estimation Techn...
PPTX
Project Approach: Intro. Technical Plan, Choice of Process Models: Waterfall,...
PPTX
Programme Management & Project Evaluation
PPTX
Step Wise Project Planning: Project Scope, Objectives, Infrastructure, Charac...
PPTX
Introduction to Software Project Management:
PDF
The HyperText Markup Language or HTML is the standard markup language
PPTX
PPTX
PPTX
Getting Input from User
PPTX
PPTX
Transaction Processing in DBMS.pptx
PPT
web_server_browser.ppt
PPTX
PPTX
Number System.pptx
PPT
Programming Language.ppt
PPTX
Information System.pptx
PPTX
Applications of Computer Science in Pharmacy-1.pptx
PPTX
Application of Computers in Pharmacy.pptx
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Effort Estimation: Meaning, Problems with Estimation, Basis, Estimation Techn...
Project Approach: Intro. Technical Plan, Choice of Process Models: Waterfall,...
Programme Management & Project Evaluation
Step Wise Project Planning: Project Scope, Objectives, Infrastructure, Charac...
Introduction to Software Project Management:
The HyperText Markup Language or HTML is the standard markup language
Getting Input from User
Transaction Processing in DBMS.pptx
web_server_browser.ppt
Number System.pptx
Programming Language.ppt
Information System.pptx
Applications of Computer Science in Pharmacy-1.pptx
Application of Computers in Pharmacy.pptx

Recently uploaded (20)

PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Construction Project Organization Group 2.pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
Geodesy 1.pptx...............................................
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPT
Mechanical Engineering MATERIALS Selection
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
PPT on Performance Review to get promotions
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Well-logging-methods_new................
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPT
Project quality management in manufacturing
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Construction Project Organization Group 2.pptx
Sustainable Sites - Green Building Construction
Geodesy 1.pptx...............................................
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Internet of Things (IOT) - A guide to understanding
bas. eng. economics group 4 presentation 1.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
R24 SURVEYING LAB MANUAL for civil enggi
Mechanical Engineering MATERIALS Selection
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPT on Performance Review to get promotions
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Well-logging-methods_new................
Embodied AI: Ushering in the Next Era of Intelligent Systems
Project quality management in manufacturing

Setting up github and ssh keys.ppt

  • 1. Setting up Github and SSH Keys
  • 2. SSH Key • When working with a GitHub repository, you'll often need to identify yourself to GitHub using your username and password. • An SSH key is an alternate way to identify yourself that doesn't require you to enter you username and password every time. • SSH keys come in pairs, a public key that gets shared with services like GitHub, and a private key that is stored only on your computer. If the keys match, you're granted access. • The cryptography behind SSH keys ensures that no one can reverse engineer your private key from the public one.
  • 3. SSH Key • Using the SSH protocol, you can connect and authenticate to remote servers and services. With SSH keys, you can connect to GitHub Enterprise without supplying your username or password at each visit.
  • 4. Checking Existing key • Before you generate an SSH key, you can check to see if you have any existing SSH keys. • Command to check an existing key is: $ ls –al ~/.ssh Note: I am executing this command in git bash
  • 5. Checking Existing Key • SSH keys are stored under .ssh folder and by typing ~/.ssh you have specified the relative path of the key. • I have a key already created in 2019. So the output looks like this.
  • 6. Generating a new SSH key • If you don't have an existing public and private key pair, or don't wish to use any that are available to connect to GitHub Enterprise, then generate a new SSH key. • Command is: $ ssh-keygen -t rsa -b 4096 -C „mukesh.27406@lpu.co.in" • Last argument is your github registered email ID.
  • 7. Just press enter key leaving it with default file name.
  • 8. • If you have an existing SSH key, it will ask the permission to overwrite, I have chosen “yes” for overwriting. • Next git bash prompts you for a pass phrase. Enter a simple and memorable passphrase. (Note: while typing and retyping the passphrase, it remains invisible) • You can leave it empty i.e. no passphrase • After entering passphrase, gitbash will produce and show output as in next screen.
  • 10. • It has saved identification at /c/Users/Mandeep/.ssh/id_rsa • It has saved public key at /c/Users/Mandeep/.ssh/id_rsa.pub • It has generated a key fingerprint as: SHA256:dXzvWP3GysUzieTkA1R6ydz/j8v1213K0m7hy9Y//mM mandeep.13695@lpu.co.in • It has generated a key's randomart image
  • 11. Adding your SSH key to the ssh-agent • The ssh-agent is a helper program that keeps track of user's identity keys and their passphrases. • The agent can then use the keys to log into other servers without having the user type in a password or passphrase again. • This implements a form of single sign-on (SSO). • The SSH agent is used for SSH public key authentication. • It uses SSH keys for authentication. • Users can create SSH keys using the ssh-keygen command and install them on servers using the ssh-copy-id command.
  • 13. • Add your SSH private key to the ssh-agent. If you created your key with a different name, or if you are adding an existing key that has a different name, replace id_rsa in the command with the name of your private key file. $ ssh-add ~/.ssh/id_rsa • It will ask for your passphrase, after entering passphrase you will see following output.
  • 15. Adding a new SSH key to your GitHub account • To configure your GitHub Enterprise account to use your new (or existing) SSH key, you'll also need to add it to your GitHub Enterprise account • After adding a new SSH key to your GitHub Enterprise account, you can reconfigure any local repositories to use SSH.
  • 16. • Copy the SSH key to your clipboard. • If your SSH key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace. $ clip < ~/.ssh/id_rsa.pub
  • 17. • Got to your github account and open settings.
  • 18. • Open SSH and GPG keys
  • 19. • Click on new SSH key button
  • 20. • Enter a descriptive title. • Paste the contents from clipboard. (Note: Pasting the contents have to be the very next step after clip command) • Click on Add SSH key button. (Note: you may have to delete the existing SSH keys associated with your account)
  • 21. • After you've set up your SSH key and added it to your GitHub Enterprise account, you can test your connection. • Command is: $ ssh –T git@<hostname> Testing SSH Key
  • 22. • Practice this and discuss your problems and doubts using LPU live app.