HTTP vs SSH - muneeb-mbytes/computerArchitectureCourse GitHub Wiki
SL No | Contents |
---|---|
1 | Introduction |
2 | Steps to generate an SSH key pair |
3 | Converting HTTPS link to an SSH link |
Introduction
Difference between HTTP, HTTPS and SSH links
HTTP: Stands for Hypertext Transfer Protocol. That isn't safe. Since information delivered over HTTP is sent in plain text, hackers can intercept and alter it.
HTTPS: Stands for Hypertext Transfer Protocol Secure. All communications between the user's browser and the website are encrypted if a URL loads using the HTTPS protocol.
For more information: All about links
SSH: Stands for Secure Shell. Provides encryption for data in transit and also includes authentication for both the client and the server. Used for secure remote access to servers (SSH login)
SSH Keys in GitHub
Need for SSH Keys
You'll frequently need to authenticate yourself to GitHub using your username and password while interacting with a GitHub repository. An SSH key is a backup identity that you can use instead of constantly entering your password and username.
SSH keys are saved in pairs: a private key that is kept on your computer alone and a public key that is shared with services like GitHub. As long as the keys match, you get in.
Nobody will be able to reverse engineer your private key from the public one thanks to the cryptography used in SSH keys.
Steps to generate an SSH key pair
Step1: Navigate to GitHub settings
Step2: Click on SSH and GPG keys
Step3: Click New SSH key, it will open a window asking key title and the key
Step4: Now open your terminal paste the below command
ssh-keygen -t ed25519 -C "[email protected]"
Step5: It will ask for the file where the key needs to be stored, if we click enter then it will take a default location
Step6: Click enter twice
Step7: In this step the public and private key will be generated and it will show you the location where it is stored.
Step8: We can navigate to that path and find the public and private key in our system. Open the file ***.pub and copy the public key generated
Step9: Paste the public key in the GitHub window and give a key title
Step10: We are done and ready to go!