Okay, now the last of all is to connect to a remote server. So these are the commands that we are going to see in this video. Okay, so the command is SS edge. Now, the SSH refers to Secure Shell. So we are going to connect to the shell of a remote server. So we have to so so I'm going to show you how to connect to an AWS.
So, so this is an instance running on my AWS account. And I'm going to connect to this. So So here I have to click on this Connect button. And it is going to show me this. And this is the connection procedure that you will be shown with. So here, you will need your private key.
So while creating the instance, you will have to create or use an existing private key. So I have my private key with me. So, the first command is you have to run the CH mod on this private key. So, I'm going to copy this command, and I'm going to run it here. So, I have this private key here. So, I'm going to paste this command.
And next, we have to connect to our instance using this public DNS. So the SSH that We are going to use here is this whole SSH command. So I have copied it and I'm going to paste it here. Let me copy it again. Copy and Paste. So I have copied and paste this command here.
So this is the whole SSH command that you have to run. So in here we have written SSH then dash I option. And then this is our private key. And this is our DNS for the server. So enter. So as you can see that We have successfully connected to our server.
Now, let's go into the root directory. And let's LS. So this is its root directory. So we have successfully connected to our remote server of AWS. So now if you want to exit from this, then you just have to right exit, and you will be disconnected with the server. Now, if you want to connect to a server using any port number, then you can do that as well.
So you just have to specify the dash p option and then write the port number. So have written the port number 80. So now so as you can see, the server has refused the connection as the Port 80 is not being made open on this server. So this is how you can use to connect to a remote server using the SSH command.