Saturday, May 30, 2009

Using that New MIT Athena Webspace

  • List of changes to this article.
  • Update 1/10/10: Those of you ubuntu who like graphical ways of accessing files on Athena (and copying to/from folders, including the /www or /Public folders ("uploading")), may like
    Places > Connect to Server... > [Service type: SSH] [Server:] > Connect
    as another way to connect to Athena filespace
  • Update 6/24/09: If you're curious about what we're doing and the background for all of this, found a neat blog by another '13er that goes more in depth (and has purty screenshots that I am too lazy to make): Using MIT Athena Remotely, Part 1: SSH and Linerva || The Sam Range Blog.
    See also the SIPB Documentation page which has lots of useful guides.
  • Update 8/06/09: Note that I'm using '#" to mark comments in blocks of code
This post explains how to connect to MIT Athena remotely & transfer files there or host a website.

Summary of Steps

In short, at a *nix or Mac terminal, type in:
(where kusername is your Kerberos username)
On Windows, ssh is not built in. Download PuTTY and enter into the "Host Name (or IP address)" box to connect to the remote server; everything else is the same.
Then type in:
add scripts
and choose a piece of software from the options given. OR if you just want to host a file or two,
cd www
and create your files (e.g. index.html) there. OR if you want to copy a file from a local directory to the remote directory,
sftp   #(OR
Connecting to
Password:  #Enter your password
cd www
put localfile.html remotefile.html
=== It took me a while (yes, I slow) to figure this out, but I found it surprisingly easy to set up a website using my new Athena lockerspace(s?). But the IS&T website was not too helpful (difficult to find the right page), and many of the documents linked to on the SIPB website pulled up 404 pages. [1] So here's my own help page.
First, created my Kerberos account (using the piece of paper IS&T sent me in the mail, aka the "account coupon in the May Admissions mailing"). [2]

Option 1: Creating a file in your webspace

For putting up files, or just getting a homepage up,
  1. Remote login to Athena account
    On *nix or Mac, open up a terminal.
    where user is your desktop username. Type in
    where kusername is your Kerberos username. [3] [4] [5]

    On Windows, ssh is not built in. Download PuTTY and enter into the "Host Name (or IP address)" box to connect to the remote server; everything else is the same.

    After typing in my password, I was greeted with
    Welcome to Linerva, the SIPB Linux dialup for MIT.
  2. Open the /www directory
    Type in
    cd www
    (This is what it should look like:
    kusername@vinegar-pot:cd www
  3. Create file
    I used vi to create a file, index.html [6]. If you haven't used vi before, use nano instead (replace the "vi" below with "nano", and ignore the 2nd block of instructions which are vi-specific).
    vi index.html  
    i #This enters into "edit mode"
    testing123123 #This is what my homepage will say
    [ESC] #The escape key, this escapes into "command mode"
    :w #This writes the file
    :q #This quits vi
  4. Feel free to logout now by typing
As far as I know, this puts a file up at three URLs:
See www under The Layout of a Typical MIT Locker.

Option 2: Copying a file to your webspace

[Update 6/10/09: Added the entire following section] This took me the longest to figure out, because the only instructions I could find were outdated or pulled up empty pages (e.g. Filezilla at MIT). Anyway, ftp doesn't work. In order to connect "from a non-Athena UNIX machine to an Athena dialup or private workstation," as opposed to "from Athena to a remote-access Athena workstation," you have to use sftp.
  1. So, open up a terminal, and sftp to MIT Athena.
    user@user-desktop: sftp  #(OR
    Connecting to
  2. Enter your Kerberos password when prompted.
  3. Change remote directory to the www directory (the public Internet accessible directory).
    sftp> cd www
  4. If you need to, change the local directory to where your file is located.
    sftp> lcd localdirectoryname
  5. "Put" (copy) the file from your local directory to the remote directory.
    sftp> put localfile.html remotefile.html
    Uploading localfile.html to /afs/
    localfile.html                                   100%   86     0.1KB/s   00:00    
  6. Disconnect (quit the sftp connnection).
    sftp> quit
Other useful commands:
ls #Lists contents of remote directory
lls #Lists contents of local directory
pwd #Prints name of current (working) remote directory
lpwd #Prints name of local working directory
rm filename.txt #Removes filename.txt from remote directory 
Most ftp commands work. Google for more commands, e.g. UNC @ Chapel Hill - sftp commands.

Option 3: Installing a CMS, wiki, etc.

For installing a wiki, CMS, etc., the SIPB people have created a really nice service called Scripts, which has quick-installers for many popular web packages. It does other stuff too, which I'm not really clear about. See In plain language, it makes getting those web packages up and running on my own webspace super easy. As detailed on,
  1. Remote login to Athena account (see above, under Option 1)
  2. Type in
    add scripts 
    (this has to be done each time I login)
  3. Type in
  4. Choose from the options given
    What piece of software would you like to install?
    1 MediaWiki
    11 Django
    Please enter a number 1-11: 3
  5. Blah blah follow the instructions
  6. Following the prompt, type in the name of the directory the web package should be installed in, e.g.:
    Desired address:
Voila! That's it, now just visit (whatever directory you installed in) and there's now a shiny new piece of software there. For joomla, note that the adminstration login is at . Yay now to play around with this stuff.


System used: Ubuntu 8.10, Firefox 3.0.10
 [1] I actually found this really useful blog post for prefrosh in May while writing this, but it just says
Want to upload things to your MIT Athena or Web space? You can do this via SFTP to, or for the less technically inclined, you can download SecureFX from the MIT software page. It's a handy drag-and-drop Windows tool.
At least it would have helped me ask the right question, though.
[2] There's a slight activation period wait so I came back the next day, and nearly couldn't remember my password. Note that attempting to login at pulls up
Your email account is provided by MIT's Exchange email service. Please access your MIT email by visiting
This is actually an error message, not a warning, and attempts to login on don't do anything except pull up this message again. I kept trying different passwords here to no avail, until I realized... yea. (I hadn't gotten a personal MIT certificate yet, and it turns out that, without a certificate, the only way to reset my password would be to visit IS&T in person and show ID). [3] This works too:
But it's a lot slower getting to the prompt for some reason. It goes through a bunch of random stuff first before it finally gets to the prompt:
What DISPLAY are you using [default: none]? none 
Setting DISPLAY to none:0
Running standard startup activities ...
zwgc: Unable to open X display -- disabling X driver.
zwgc: To receive Zephyrgrams, (type `zwgc -ttymode').
zwgc -ttymode
mailquota: Cannot connect to IMAP server on EXCHANGE.MIT.EDU
from: Cannot connect to IMAP server on EXCHANGE.MIT.EDU
[3.1] Some SIPB member verified on zephyr -c 2013 a while back that the "What DISPLAY are you using [default: none]?" field should be filled with "none."
 [4] The first time, it asked
Are you sure you want to continue connecting (yes/no)?
and I typed "yes."
ssh -l username
This also works, but requires more typing.
 [6] index.html is the default homepage file. If it's in the /www directory, typing in will pull it up by default as my homepage.

List of changes to this article:

  • 6/02/09: Found third mirror for files under www
  • 6/10/09: Figured out how to ftp to Athena space, so added it as another option
  • 6/24/09: Changed -l kusername to Also, added the Mac and Windows instructions with their colored divs and changed the monospace text to a font that differentiates between the number "1" and the lowercase "l".
  • 8/05/09: Fixed some formatting errors involving me putting HTML tags inside code blocks (and ruining the fixed whitespace). Clarified the vi vs nano instructions. Added [3.1].
  • 8/06/09: Moved changes list to bottom of post, fixed remaining html tag in code block, changed /user/u/n/kusername to user/k/n/kusername, removed lcd and inserted pwd and lpwd.