Ask SIPB - January 15, 2003

With all the publicly available computers at MIT, it's very convenient to quickly stop by one and do some work. But if you don't have an Athena machine at home, moving files back and forth can be a challenge. This week's column covers transferring files between Athena and other computers.

What settings should I use to connect to Athena remotely?

To connect to Athena using SSH, SFTP, or SCP, you can connect to a few different machines:

Normal: athena.dialup.mit.edu

You can also connect to private Athena machines, if the administrator has allowed you to do so.

Why can't I telnet or FTP into Athena?

Incoming telnet and FTP connections to Athena are disabled as they both send your password unencrypted, allowing your account to easily be broken into. You should use SSH instead of telnet, and SFTP, SCP, or Kerberized FTP instead of plain FTP.

How can I use my Public and www directories to share files with other people?

By default, your Athena account has two directories, the Public and www directories, pre-configured to share files with other people.

The www directory is primarily intended to be used as a web page. Anything you put in that directory is publicly accessible, and can be accessed with the URLs:

http://web.mit.edu/username/www/ and
http://www.mit.edu/~username/

The Public directory is primarily intended to be used to share files through Athena. Anything you put in that directory is also publicly accessible. To get to someone's Public directory, type:

athena% cd ~username/Public

Public directories can also be accessed at the URL: http://web.mit.edu/username/Public/

If for some reason your Public or www directories are missing or misconfigured, you can restore them with the following:

athena% cd
athena% mkdir Public
athena% mkdir www
athena% fs sa -dir Public -acl system:anyuser rl
athena% fs sa -dir www -acl system:anyuser rl

How can I use an SFTP client like SecureFX or a Kerberized FTP client like FileZilla to transfer files to and from Athena?

Both SecureFX and FileZilla act as regular FTP clients, but they also support secure connections. You can connect to Athena using the settings given above, and you will connect securely.

With either program, you can simply drag files between your local file listing and the remote Athena file listing, and the file will be transfer, just as you would with a regular FTP client.

With FileZilla, you must have Kerberos tickets, which you can obtain with Leash32. If you do not have Kerberos tickets, you will not be able to connect.

You can obtain Kerberos Leash32, FileZilla, and SecureFX from the MIT software site at http://web.mit.edu/software/.

How can I use SCP to transfer files to and from Athena?

SCP (Secure CoPy) is a secure alternative for copying files between computers, and has now replaced FTP as a method of file transfer to and from Athena. SCP uses the secure shell (SSH) for authentication and encryption, so you can use it with any UNIX host configured to accept SSH connections, such as the Athena dialup machines.

SCP is available on Unix machines, including Athena. Third-party software, such as PSCP (included with Putty, an SSH client), will also allow you to use SCP on other operating systems.

To use SCP you first specify which file you want to transfer, then specify your user name and host you are transfering to, and finally the intended location of the file:

scp foo.txt username@athena.dialup.mit.edu:/afs/athena.mit.edu/user/u/s/username/foo.txt
More information is available at
http://web.mit.edu/acs/faq/remote_access/filetransfer.html.

How can I use AFS to transfer files between my personal computer and Athena?

Athena uses a filesystem known as AFS. With AFS, you can work with files as if they were stored locally, without having to worry about transferring files between different systems. Out of all the options given above, AFS is the easiest method of working with files on Athena and on your personal computer.

AFS, however, is very complicated to install and configure properly, especially on Windows. Consequently, it is recommended that only computer-savvy users attempt to install AFS. If you wish to install AFS, go to http://www.openafs.org/ and download OpenAFS and install it.

After installing OpenAFS, you can then work with files normally. On Unix machines, your home directory is /afs/athena.mit.edu/user/u/s/username, where u is the first letter of your username, and s is the second letter of your username. On Windows, you can configure a drive letter for your home directory, and for the AFS root filesystem (or any other AFS location).

Is it possible to access files shared by my Windows machine from Athena, such as MP3s?

This is possible on Linux-Athena machines. In the clusters, the Dell and IBM machines are running Linux-Athena. Linux-Athena is based on Redhat Linux, and includes a collection of programs called Samba. Samba is used to share files and printers with Windows.

To access your fileshare from an Athena machine using these instructions, you will need root access to the machine. There are other methods which work without root access, using the program smbclient, which we will not cover. To become root on an Athena machine, type "su" at the athena% prompt, and enter the root password. To find the root password on a public cluster machine, run "tellme root" at the prompt. For a non-public machine, you must find out the root password from an administrator. Once you are root, your prompt should change to something like "bash-2.05a#".

Once you are root, you can mount your windows fileshare using the smbmount command. First you need to create a mount point, an empty directory where the share will appear. The name of the mountpoint doesn't matter, but it must be a new, empty directory. For example:

bash-2.05a# mkdir /tmp/windows

Now use smbmount to mount the fileshare. smbmount takes two arguments. The first is the path to the "service" you are mounting. The second is the mountpoint you created above. To mount this share, run:

bash-2.05a# smbmount //machinename.mit.edu/sharename /tmp/windows

This will prompt you for a password. By default, smbmount will use your username to connect. To use a different username, add "-o username=myname" to the end of the smbmount command, replacing myname with the username you want to use.

For more information about the other options to smbmount, run "man smbmount". For information about other Samba tools see their website at http://samba.org/.


If you have any other questions, feel free to email us at sipb@mit.edu. We'll try to get back to you, and we might put your answer in our next column.