Watching:  

Getting Started with SSH


Author: Subject Coach
Added on: 4th Jan 2015

 
Please note: You need to login to view this resource

In this short course we will explore what SSH is. This course is split into multiple parts such as

  1. Introduction to SSH
  2. Generating a Key Pair to make connections
  3. Accessing remote servers using SSH client
  4. Various scenarios SSH can be used in
  5. Installing SSH server

Primary objective of this course is to get you up and running with SSH. 

We hope that you will enjoy this short course. 

Author: Subject Coach
Added on: 4th Jan 2015

Please get in touch with your teacher or tutor in case you have a question related to this lesson

None just yet!


When you want to access your Linux machine from another Linux machine or Mac, you don't need to install a SSH client.

SSH client comes pre packaged with all flavors of Linux.

Open up Linux terminal on your machine, When you are ready to connect to our remote server, type
> SSH username@hostname/IP address of the remote server, and press enter.

If SSH server is running on a port other than twenty two! you can update this command to
> SSH -P port number username@hostname or IP address of the remote server.

You will be asked to accept the server host key. This is so that SSH client can add this server to known hosts.

Type in the password for the user.

Now you will have access to remote server. Let's create a file called file a, dot txt and add some text to it.

Now when you check contents of the newly created file on our remote server, i can see the changes done.

When you access any remote server for the first time, you have to accept host key so that, SSH client can add an entry for the server in trusted hosts lists.
This list can be found under dot ssh folder on the connecting machine.

Change directory to dot ssh, which can be found under user home folder on connecting machine. Now open known underscore hosts file.

You will see an entry for our remote server there. If I make a change to this entry and try to connect again, you will be shown the warning that host key has been changed.

This is the SSH way of alerting you, if you want to trust the server again. You would want to delete the old entry from known hosts file, to keep it clean.

In next chapter will we learn how to connect to a remote server using a private key.