Using MIT Athena Remotely, Part 1: SSH and Linerva

Athena is the distributed computer system used at MIT. It began in 1983 as a joint venture between MIT, IBM, and DEC. It shaped the development of desktop computers and is still used extensively at MIT and several other universities. On campus, Athena can easily be accessed at Athena terminals, located in Athena clusters and interspersed around campus.

For students off campus, MIT provides remote access to the system. This is the first installment of a guide to running Athena from your home computer. It guides you through logging in to Athena using SSH and Linerva. It is a work in progress, so I’ll modify it should clarifications or changes be useful. Future parts will address Zephyr, Barnowl, and GNU screens. This guide assumes you already have a Kerberos username and password (obtained by following the instructions in your Next Big Mailing), an internet connection, and a computer running Windows, Mac OS X, or Linux.

What is SSH?

SSH (Secure SHell) is a communications protocol that allows parties to communicate securely over the internet. Here, SSH is used to let you login to Athena securely, using your Kerberos login.

In order to login to Athena using SSH, you’ll need an SSH client. This will be different for different operating systems, so follow the one that’s appropriate for you.

SSH for Windows

PuTTY is an open source (MIT License) SSH client for Windows. You can find it at the PuTTY download page. You’ll want the first binary “putty.exe”. Download it to somewhere you can find it, like your desktop.

Run the file you downloaded (no installation required) and you’ll get a screen like this, but without the “host name” field filled in.

puttydialog

We’re going to connect to MIT using Linerva, a portal for accessing Athena remotely. So, in the “host name” field, type “linerva.mit.edu”. We want to use SSH, so select “SSH” under “connection type,” if it’s not already selected. Finally, click “Open” to initiate the SSH connection.

A new window will appear asking you for your username. Enter your Kerberos username and press enter. Then, it will ask for your password. Enter your complete password, including punctuation and capital letters if appropriate. Linerva does not show asterisks as you type (so someone peeping over your shoulder doesn’t know how many digits are in your password), but it is still receiving what you type in, so don’t be perturbed. When you’re finished, press enter again, and if you provided the correct information, you’ll be logged in.

This is an example. If Susan Hockfield were logging into Linerva using PuTTY (I don’t know if she does), this is what she would see.

hockfieldputty

Do note: some of the messages displayed when you log in may be different from what you see above.

Now, you are logged in to Athena. Skip to the Athena Primer below for an introduction.

SSH for Mac OS X and Linux

Both Mac OS X and Linux share a common ancestry with Athena, so they come with the tools for communicating with SSH. You will have to open the terminal, which can be found in OS X by going to the Applications -> Utilities folder and opening “Terminal”. For Linux, different distributions will place the terminal in different locations, but you’re probably familiar with it. If not, Google “[your distribution] terminal” and you should find it.

With the terminal open, we will use the SSH command and log in to Linerva, a portal for accessing Athena remotely. Type “ssh [your username]@linerva.mit.edu”, where “[your username]” is your Kerberos username. For instance, Susan Hockfield would type “ssh hockfield@linerva.mit.edu”. Then, press enter. You will be prompted to enter your Kerberos password.

Enter your complete password, including punctuation and capital letters if appropriate. Linerva does not show asterisks as you type (so someone peeping over your shoulder doesn’t know how many digits are in your password), but it is still receiving what you type in, so don’t be perturbed. When you’re finished, press enter again, and if you provided the correct information, you’ll be logged in.

Athena Primer

The Athena command line interface (CLI) is extremely similar to the one used in OS X and Linux, so if you’re already familiar with one of those, you should be right at home.

The command line interface is a bit different from the now-conventional graphical user interface (GUI), like the ones used in Windows, OS X, or desktop Linux distributions. Instead of having icons to click with your mouse, you type commands, press enter, and the computer executes the command. This system was ubiquitous in the early days of computers and is still widely used in all kinds of computing environments, such as web servers, corporate payroll systems, and supercomputers. However, if you’re unfamiliar with it, it requires some adjustment.

First, try a simple command, such as the “echo” command, which prints the words you instruct onto the screen. Type ‘echo “Hello World!”‘ without the outside quotes and press enter. Athena will execute your instruction and repeat “Hello World!” After it does so, it will have completed your instructions, so you will see a flashing cursor as it waits for more instructions. As you type various commands into the CLI, you will continue scrolling down the screen. You can review the history of instructions you have given by scrolling up.

Athena has a file structure similar to the operating system you’re used to, with files tucked away inside nested folders.When you log in, Athena places you in your home folder. This is the folder on Athena where you can place files. It is accessible from any terminal in Athena.

While you’re in the folder already, you obviously can’t see icons for the files and folders inside it. So, there’s a command to display the contents of the folder you’re in. Type “ls” and press enter, and you’ll see a list of everything in the folder. By default, there’s a file called “welcome”. To open it, we’ll use nano, a lightweight text editor that comes with Athena. Type “nano welcome” and you’ll see something like this.

nanowelcome

Nano shows one page of text at a time. You can scroll using the arrow keys or Page Up and Down. If you’d like, you can edit the text in the welcome file, or you can just read it. When you’re done, you’ll want to exit the program. Along the bottom, you can see various commands you can give nano. You want “Exit”, which is accessed by pressing “^X”. Here, “^” means Control, so press Ctrl+x to exit. If you made changes, nano will ask if you want to save them. Press “y” or “n” to indicate “yes” or “no”.

Now you’re back at the command line with a blinking cursor waiting for instructions. You’re still in your home folder, but let’s change that. To create a new folder called “demonstration” for us to use, type “mkdir demonstration”. The “mkdir” (short for “make directory”) command creates a folder, and you type the name you want to give the folder after the command – in this case “demonstration”. Press enter to run the command and the folder will be created. You haven’t told Athena to change your directory, so you’re still in your home folder. Enter “ls” again and you’ll see the “demonstration” folder you made.

To move into that directory, you’ll use the “cd” (for “change directory” command). Enter “cd demonstration” and you’ll move into the “demonstration” folder. The text before your cursor will change to reflect this. Now, we’ll create a file, using nano again. Type “nano” to start the program. Nano works like a normal text editor, except without a mouse. Type some stuff – maybe your favorite food or the color socks you’re wearing – until you’re satisfied. Now, we’ll exit, again using Ctrl+x, and nano will ask if we want to save our work. We do, so type “y” for yes. It will ask for the name we want to give the file. Type “test” and press enter. Nano will close and the file will be saved to the “demonstration” folder. You can see it by typing “ls” again.

Now we’ll delete a file. The “test” file isn’t very useful, so we’ll get rid of it. Type “rm test” and press enter. “rm” is short for “remove” and deletes the file or folder you specify. If you type “ls” again, you’ll see that “test” is gone.

Edit (6/21/09 6:32 PM): If you’re a curious soul like Divya ’13 and choose to name the file something like “lovely foods” with a space, you’ll have to include quotes to tell Athena it’s a single file. ‘rm “lovely foods”‘

Now, we’ll get rid of the “demonstration” folder. To move back into the home folder, type “cd ../” and press enter. “cd” is the change directory command, and “../” specifies the folder above you. Slashes are used to divide folders, so this can be repeated. If you were hypothetically in a folder “coursework/6.01/algorithms/sorting”, you could get back to your home directory by typing “cd ../../../../”. Now, you’re back in your home folder, and you want to get rid of “demonstration”, so type “rm -r demonstration” and the folder will be removed. Note: “rm” only removes single files. To tell Athena you want to delete a directory, use the “-r” option as shown.

Now, you’re back to your home folder and things are back to normal. If you enter “ls” again, you’ll see that the “demonstration” folder is gone. You’ve just created, moved between, and deleted files and folders in Athena.

If you find errors in this procedure, email me at “namu” [at] “mit.edu”. Include the specifics and I’ll get things sorted out. I’ll post further parts explaining Zephyr, Barnowl, and GNU screens.

Edit: part two is now online.

Post a Comment

You must be logged in to post a comment.