Hello, Jim.
In this lesson, I'm going to show you how you can establish S.H. Connection.
We'll talk briefly about why do we need it after that.
I will tell you how you have to generate SSL keys on your computer and where to configure SSL connection
in your account.
Also in this lesson, I will show you how you can update your remote repository that is connected to
your local one.
To start with, I'd like you to understand first what is SNH?
Because you're in your life as a software engineer.
You're going to use this protocol many times to get access to other computers, as, say, stands for
Secure Socket Shell.
It is a security protocols that allows you to connect to a remote computer by using text based interface.
Using the Sensage, you can easily log into another computer from anywhere and perform any commands
on that computer or do any changes you wish.
The goal of SFH is to make remote connections to computers much more secure while working with remote
repositories.
You often have to identify yourself using your username and password and establish an SSA connection
is another way.
How to identify yourself without using the username or passwords.
Every time SSA requires both components to be configured server side, that is our remote repository.
In this case, this is a GitHub and the second part is a client side.
That is our local computer to authenticate user as I keys are quite the key come in pairs.
Public and private key public key.
You can store on any remote server on the GitHub for example, and the private keys stored only on your
computer during the establishment of S.H. Connection Key is checked in case they're matched SSA each
session is established.
The cryptographic behind SSL key ensures that no one can reverse engineer your private key from the
public one.
Now you understand that first thing we need to do is to generate SSL keys.
Let's do that.
The few different ways how to generate as a stage kiss on your computer and if you Google this question,
you might find a few commands that help you to generate MSH cues from the console.
But I'm going to show you the easiest way to generate a set of keys that almost never mentioned to generate
the key.
Open the app.
You can find it in window search or just by pressing a mouse.
Right.
Click in the file explorer and selecting it be.
If you open it in the folder where you have local git repository initialized, it can look like this.
But in case you open, get GUI in some other place it can look like this.
Nevertheless, in both cases we need to click on the help up here and after that show at S.A.G. Press
generate key button.
Now I'm asked to enter a passphrase.
The main goal of this passphrase is to encrypt your private key in case attacker would steal your private,
as I say, key.
It will be useless for him because he doesn't know your passphrase.
While attackers spend time on crack in your private key passphrase can buy you some time to revoke keys
and roll over to the new one.
By leaving this field empty, we acceptance the risk that the attacker can get access to the private
key on our computer.
I just click OK button and when I am asked to enter the same passphrase, I just click OK, button one
more time.
And here you are going to see only publicly that you can share copies is key to the clipboard.
And open your GitHub account here.
Click on icon of your profile and select settings here.
Find a cessation keys section, click on it.
You can have multiple SSL keys associated with your account.
For example, here I have my two laptops connected to the single account, my HP and ASUS laptops.
To add new SSL key, just click this button.
Title can be any title you would like.
For example, my laptop.
Then put your cursor in key text area and paste the content of your clipboard.
I press control and be awesome.
Now press at S.A.G. you have me ask you to insert password.
And I can see the new S.A.G. is added to this list, great, what to do next to work with your remote
repositories, we assess each protocol you have to set the proper remote.
Let's navigate back to our kybosh to check what remote repository we currently have said.
You remember the command to check the remote gate remote with option B here.
You can see that currently we use HTTPS protocol to connect to our remote.
We need to change our remote to connect our repository.
We are S.H. Where to find another Ururoa.
Let's go back to the Web browser to our good Happe account.
Here is the repository which we created together on the previous lesson.
Let's press this green button here to remember that on previous lesson we selected HTP on purpose during
the remote setting.
Now I want you to press this button as SNH copy to the clipboard, this URL.
Let's get back to the kybosh on previous lesson.
You learned that that remote we have to target remote at command, but to change the remote area, we
have to enter another command that's typed the following.
Guedes remote said Eurorail a region and paste Eurail that we copied on the GitHub.
Press enter.
Now let's check our remote.
Awesome.
Now we see that we are not using HTTPS protocol anymore.
Let me show you one more thing so that you will be ready for that.
I want to make some changes.
Let me make some changes in this file.
Now, let me add it to the staging area and create a commit you commit, dash a dash cam test, S.H.
Connection, OK, committers created.
Now let's push our changes to the remote repository yet push origin master Origin Master is a reference
to our remote repository.
But on previous lesson we already set up stream for our current branch by using EU option.
That means my local repository is already aware that this master branch is connected with Master Branch
in the region.
And that also means that for me it is not necessarily to write Origin Master.
Let me even remove that now.
Press enter the message, which you see here is just to ensure that you trust this remote host and want
to connect to it types to get help to the nonhostile.
This message will appear on the first time you connect to the host and sees a message that this host
is permanently added to the list of known hosts.
The list of known hosts is located in the same folder.
You can find this folder inside your computer user folder in Linux based systems, including Mac OS.
This folder is located in the home directory.
Here in the directory you can find private and public access key and file with a list of nonhostile.
You can open this file in the notepad if you want to explore it.
Contents.
Let me search for GitHub mentions in this file.
And here you can see you have was added at the end of the list and let's check our repository to make
sure that our commute was successfully pushed to the remote.
I refresh page and here all you can see my last commute message and also I can check comit history.
Click here on comments.
Here's our latest comit.
Great.
Now, let's recap what we have learned today.
Today, we learned what is SSR protocol and when we need to use it, you understand how sausage connection
is created and how to generate.
As I say, each case, we can figure out our remote repository to work through the S.H. and we learned
what are known hosts are and how to give hope to the nonhostile.
That's all for now.
Thanks a lot for your attention and see you in the next lesson.