Remote Login with SSH

SSH

SSH stands for secure shell.  It is a protocol used to establish a secure encrypted communication channel between a client program on a local computer and a server program on another host computer.  In order to use SSH, however the user on the local machine must have valid credentials (username and password) for the remote host.  With SSH, a user on one machine can log into another and issue commands on the remote machine.

SSH on Windows

Putty is a GUI based SSH client for Windows.  Installation of Putty is easy, just go to their download page and download and run either the Windows installer or a pre-compiled executable (you’ll most likely need the 64-bit version).  Below are instructions on how to establish a basic connection.  For information on all of the features of Putty, consult the Putty User Manual.

When you start Putty you’ll see a screen similar to the one shown below.  To establish a connect to a remote host, in the field labeled Host Name or IP address, enter username@hostname where username is a valid username on the remote host and hostname is a domain name or IP address of the host that you are trying to log into.  Note: IP is an abbreviation for Internet Protocol.

The first time you attempt to log into the host, you will see a screen similar to the one below asking you if you trust the host machine.  Press ‘Yes’.

Next, you will be asked for your password.  Please enter your password and press ‘Enter’.  Once your credentials are verified, you will be logged into the remote machine and shown a command prompt.  From the command prompt you can traverse the file system and execute commands.

SSH on MacOS

Macs have a SSH program named Terminal already installed on them.  When you launch the Terminal app you’ll immediately see a command prompt.  From here you’ll be able to issue UNIX commands including the SSH command which allows remote login.

In order to log into a remote machine from the terminal command prompt, type ssh username@hostname where username is a valid username on the remote host and hostname is the name of the host or IP address of the host that you are trying to log into.  After you’ve issued the ssh command, press enter.

The first time you attempt to log into the host, you will see a message similar to the one below asking you if you trust the host machine.

The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 1024 7b:e5:6f:a7:f4:f9:81:62:5c:e3:1f:bf:8b:57:6c:5a
If you trust this host, hit Yes to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, hit No.
If you do not trust this host, hit Cancel to abandon the
connection.

Type Yes and press enter.  Next, you will be asked for your password.  Enter your password and press enter.  Once your credentials are verified, you will be logged into the remote machine and shown a command prompt.  From the command prompt you can traverse the file system and execute commands.

© 2017, Eric. All rights reserved.