Filed under: Technical References
Posted: March 7, 2009
One may use Secure Shell (SSH) in order to remotely connect to other computers running the SSH daemon. All CS students may remotely connect to the cs.uri.edu network in this fashion. It is relatively easy to connect to a server regardless of what operating system you are using.
For the purposes of this Howto, we will be refering to london.cs.uri.edu as the target server (the one that you will be connecting to).
Connecting to a Server from Windows
In order to connect to london via SSH, you first need an SSH client. If you’re running Windows, we recommend using PuTTY. PuTTY is a free SSH client and is flexible enough for what most people need. You may download PuTTY here.
After opening the PuTTY client file, you will be presented with a connection window (Figure 1.1). After making sure that SSH is the selected protocol and that port 22 is the port displayed in the input box, insert london.cs.uri.edu into the Host Name input box. Click “Open”.
At this point, if you have never SSH’d into london (or any other server, for that matter) from the machine you are connecting from, a window will pop up (Figure 1.2). Click “Yes”.
After you click “Yes”, the terminal window that popped up will appear. There will be a line that says login as: . Enter your username and hit Enter. You should see some nice ASCII art telling you what server you are logging into. You will now be asked for your password. Enter your password and hit Enter. Assuming you didn’t mess up your password, you should now be logged in!
One quick note: Don’t worry if you can’t see asterixes (”*”) when you type your password. This is a security trick that most Linux systems use. In reality, you are actually typing your password. However, by not showing up on screen, it makes it difficult for anyone who is looking over your shoulder (or at your monitor) to accurately guess what your password’s length is.
Connecting to a Server from Linux or Macintosh
Connecting to a server from a Linux machine is simple. If you don’t have SSH installed, then you might want to go ahead and install it. You may find an SSH client here. Similiarly, if you are using a Mac, then you should be able to execute ssh without any difficulty.
If you haven’t already done so, open up a console. Let’s assume that your username on the computer you are working on is called “david”, and that your cs.uri.edu account username is also david.
david@computer ~ $
There are two ways that you can go about connecting.
david@computer ~ $ ssh david@london.cs.uri.edu
The above example works fine. You can also use the -l flag after ssh.
david@computer ~ $ ssh -l david london.cs.uri.edu
That accomplishes the same thing as well.
However, let’s now assume that your cs.uri.edu account username is not david, but instead djones.
david@computer ~ $ ssh london.cs.uri.edu
That does not work! Why? If you do not specify any flags or a username when you enter the CS information, SSH will assume that you are connecting to london using your current username. So, unless your personal username is identical to your cs.uri.edu account, you need to explicitally specify what your cs.uri.edu username is. In other words, you should do this:
david@computer ~ $ ssh djones@london.cs.uri.edu
Or…
david@computer ~ $ ssh -l djones london.cs.uri.edu
So, what does it actually look like when you successfully ssh into london?
aschenck@celeborn ~ $ ssh london.cs.uri.edu LONDON.cs.uri.edu Password: Last login: Mon Sep 19 18:33:49 2005 from lab49.cs.uri.edu Problems? mailto:sysstaff@cs.uri.edu Have a nice day. aschenck@london ~ $
