To use the Longwood CMSC computers remotely, there are two main things you'll need to do: access a command line (using ssh), and transfer files (using scp or sftp). For a more set of instructions with extra options, see the technical version of these instructions, but this page is meant as a less technical and more concrete summary suitable for intro students. The first section gives an overview and defines some vocabulary, and the other sections give specifics of how to connect.
A computer named
gandalf is the primary system (or
"server") on our
network, and one of only two that can be directly accessed remotely.
"fully-qualified" name of the system is thus
gandalf.cs.longwood.edu, and when you access the computers
remotely, that is what you'll have to type in as your destination.
Because there are many people using these systems, we want to balance the load, so for most purposes you should request that the server "forward" your connection to one of the other computers on the network. This is done by choosing a number from 220 to 244 (inclusive) as the "port number" when you first make your connection. If you find that the system you've chosen is crowded, running slow, or down for some reason, you can just reconnect with a different port number. (Note that port numbers outside the range 220-244 will not work!) However, if you have trouble logging in, whether the connection is hanging or it's rejecting your password or whatever, try using a different number in the range---it's possible that the other port number you chose is temporarily down---and if that does work, let one of us know so we can fix it!
If your laptop is running Linux or MacOS X, an ssh program should be already installed. Open a local command line terminal (Linux: run "Terminal Emulator" from the Accessories menu; Mac: open the Utilities folder inside Applications and run "Terminal"), into which you can type
ssh -p 220 firstname.lastname@example.org replacing the 220 with the port number you've chosen, and 'username' with your own username. (If the port forwarding is not working or if you have other login problems, first try changing the "220" to another number in the range, to try a different machine.)
When you first connect to the system, or when you connect from a new machine, your ssh program will give you a message that looks something like this:
The authenticity of host '[gandalf.cs.longwood.edu]:241 ([184.108.40.206]:241)' can't be established. ECDSA key fingerprint is 4e:fe:48:42:c8:1d:ea:c2:e8:e4:64:ca:6e:08:30:8a. Are you sure you want to continue connecting (yes/no)?which is really only telling you that the computer you're sitting at has never talked to that other machine before. Type yes to proceed.
If your laptop is running Windows, you will need to first install an ssh program called PuTTY to your system.
Click that link, and download the
putty.exe executable. When you run it, you'll see a screen
with many options, but the two important things are at the top:
If you use vim and also ever use the numeric keypad,
there's one setting you almost certainly want to update: Under "Terminal"
and then "Features" you'll want to check "Disable application keypad mode",
as shown here:
(Otherwise vim does not interact well with the numeric keypad and sends
unexpected printable characters instead.)
For everything else, the defaults should be suitable, although you might
be interested in changing some of the window appearance options and
If you want to not have to do this every time you log in, you can save your session (at least on your own machine---it doesn't work as well in the campus labs). To do so, after you've set all the settings you care to play with, click on "Session" in the left-hand list of options to return to the original group: Note that you can also store your username by putting it in the "host name" field with an @ after it. Once you've saved, click "Open" to actually make the connection. In the future, you'll just need to double-click your saved session to open it.
Note that when you first connect to one of the computers, or when you connect from a new machine, putty will give you a 'security alert' that says something like about how the system is (so far) unknown, and will ask for confirmation that you do want to connect, which you can do by clicking 'Yes'.
Regardless of which computer you connect to, all your files are stored in one place, so you won't need to move them around just because you choose a different port number. However, if you want to move files between the CMSC computers and your own systems (to back them up, for instance), you'll need to use one of the following techniques.
If you are on a Mac or Windows, try a program called CyberDuck. This program also has a lot of features beyond basic file transfer.
If you are on Windows, you might also try WinSCP, which is specifically designed just for file transfer and may be simpler to use.
If you are on Linux, or if you have just a single file to transfer, or if you prefer to work from the command line, there are several other options detailed in the technical version of these instructions.
In any case, as with other connections, the server to connect
gandalf.cs.longwood.edu, using one of the port numbers
in the range 220-244.
The individual computers on our network are named after Tolkien characters and pioneers of computer science. (At one point, they were divided into two separate labs, hence the two naming schemes.) At this point, the machines are all identical except for the two servers, but in case you're curious, here is the table of correspondences (with links to articles about their namesakes):
Machines and port numbers:
Server: gandalf (not actually a hobbit, of course.)
Machines and port numbers: