Accessing Statslab Systems Remotely
Introduction
Many people have asked me for help with using their own computers to
access Statslab machines from their home or college. I am not the
best person to ask about this, because it is very difficult to provide
in-depth support when I cannot sit at your computer and see exactly
what it is doing wrong. If the machine you are using is administered
by someone else, you will do better asking them (e.g., if you are
using a college machine, your college Computer Officer will be able to
give you more help than I can).
There are many activities which fall under the general heading of
``remote access'', including the following:
- Using ssh/PuTTY to log in and possibly run graphical applications.
- Reading email from home e.g. with a Windows mail client.
- Viewing web pages to which access is restricted.
- Copying files to your home machine or viewing them over the network.
There are also many operating systems which your home computer might
be running. This document mostly covers Linux and Windows because I
do not know much about Macs (although since MacOS is a Unix, anything
involving the command line will be the same as for Linux). Matt Parry
has kindly contributed some information on the Mail on Macs email client. If
you use a Macintosh, or some more obscure system, and wish to write
your own web page about connecting to the Statslab from it, please let
me know and I'll add a link to your instructions.
When You Can't Connect
If you have been able to ssh in before but it isn't working now, the
machine you are trying to connect to may have been switched off to
save energy. If so, you can either use an alternative computer, or
ssh into sirtommy and type ``wake yukon'' replacing ``yukon'' with the
name of your computer. I have a web page with more information on energy saving
including a link to a complete list of Statslab computers.
Logging in via ssh
If you are using a Mac or Linux/Unix machine, then gaining full
graphical access to the Statslab is simple. You need only pop up a
terminal window and type ``ssh username@yukon.statslab.cam.ac.uk''
replacing ``username'' with your own username and optionally replacing
``yukon'' with any other Statslab computer. You will get a warning
message the first time you connect to a specific Statslab machine, but
if you choose to continue connecting, you won't get the message next
time you connect to that machine. If you get a ``Command not found''
error message, you probably need to install ssh. If ssh connects
successfully but you cannot run graphical applications, make sure that
it is configured to forward X11 connections, or use ``ssh -X''.
For Windows users who require full graphical access to Linux machines,
DAMTP have written a local piece of software called WineX
which can be used to launch a remote graphical session on a Maths
Linux system as if you were sitting at the console. Statslab users
should switch to the "Unix X environment" tab and ensure that the
Statslab radio button is selected.
(There are other programs which serve a similar purpose, for example
Exceed, Xming and Cygwin, but these are no longer supported.)
Windows users who only require a text-based Linux session can download
PuTTY,
a Windows ssh client.
First go to the Colours tab and change the default foreground to black
and the default background to white (or any other combination you like
- I find the default colour combination ugly and difficult to
read). Then go to the Connection tab, select the ssh button and type
in the name of the machine you want to connect to, and click Open to
connect. To save your settings for connections to a particular
machine, type a name into the Session Name box and click Save. Then
when you want to connect to the same machine again, all you need to do
is click on your session name and then Load before clicking Open.
Reading and Sending Email
The simplest ways to access your email are to ssh in and use pine or
mutt and to make use of our webmail service.
If you wish to read your email using a mail client, here are
step-by-step guides to configuring
If you are using an older version of any of these clients, you are
advised to upgrade if possible. If you are using a completely
different client, it may be useful to know that
our IMAP
and SMTP servers
are mail.statslab.cam.ac.uk. Please configure your client to use
secure IMAP and SMTP (imaps on port 993 and smtps on port 465) if
possible.
Thunderbird and Eudora OSE
| Highlight the account name, click "View settings for this
account" and click "Server Settings". Ensure that the connection
security is set to SSL/TLS. |
 |
| Also click on "Outgoing Server (SMTP)" then "Edit". As before,
set the connection security to SSL/TLS. |
 |
Outlook Express
| Tools -> Accounts -> Properties -> Servers. Tick "My
server requires authentication". Under "Settings" be sure that "Use
same settings as my incoming mail server" is ticked. |
 |
| Also Tools ->
Accounts -> Properties -> Advanced and under both SMTP and IMAP, tick
"This server requires a secure connection (SSL)". Change the port
number for outgoing mail from 25 to 465. |
 |
Outlook
If running the Startup Wizard, do not enter your name and
email address when first requested. Select "Manually configure server
settings or additional server types". Under "Choose Service" leave
Internet Email selected.
To modify an existing account, File -> Info -> Account Settings,
highlight the account and click Change. You should now be at the
first dialog box displayed below.
| Set the Account Type to IMAP and the incoming and outgoing mail
servers to mail.statslab.cam.ac.uk. |
 |
| Click on More Settings then Advanced and configure Outlook to use
encrypted connections as shown. Change the port number for the
outgoing server from 25 to 587. |
 |
| Also click on Outgoing Server and ensure that "My outgoing server
(SMTP) requires authentication" and "Use same settings as my incoming
mail server" are selected. |
 |
Matt Parry has contributed the following:
For Mail on Macs:
- open Preferences in the Mail menu
- select your Statslab IMAP account
- in Account Information, click on Server Settings for the Outgoing
Mail Server (SMTP)
- enter mail.statslab.cam.ac.uk as the Outgoing Mailer Server
- Server port can be left as 25
- enable Use Secure Sockets Layer (SSL)
- choose "Password" for Authentication and then enter your Statslab
User name and Password
- click OK
- close Preferences and choose to Save changes
Accessing Restricted Web Pages
Often access to a website is controlled by a password - for
Cambridge websites Raven
is generally used, and you are advised to apply for a Raven password
if you do not have one already. This is convenient because it allows
you to access the website from any computer in the world.
However, you may still come across websites which will only permit
access from computers within certain domains such as cam.ac.uk or
statslab.cam.ac.uk. If you want to access these websites from your
home computer, you can ``tunnel'' the web traffic over ssh. You will
need a browser which supports automatic proxy configuration scripts
e.g. a modern version of Firefox or Internet Explorer.
To set up the tunnel, run the following command:
ssh -X -D 9870 username@pigtail.statslab.cam.ac.uk
(Replace ``username'' by your username, and you can use any machine you
like instead of pigtail. Also, you may want to create a short alias
for this command.)
Windows users can type the same command with ``plink'' in place of
``ssh'' (plink
is the command-line version of PuTTY) or use Jon Peatfield's helpful
instructions with diagrams to save a PuTTY session to do the
tunnelling automatically.
There are two proxy configuration scripts you can use. If you want to
view Cambridge (including Statslab) pages as if from a local machine,
while browsing pages outside Cambridge directly, then use:
http://www.damtp.cam.ac.uk/conf/proxyCAMtun.pac
If you want to view all web pages as if from a Statslab machine (some
journals' websites can only be viewed from computers in certain
domains including cam.ac.uk), you need to use a different automatica
configuration script:
http://www.damtp.cam.ac.uk/conf/proxyALLtun.pac
When you don't need to access restricted pages, you might wish to turn
the tunnelling off
and browse the web directly to speed things up. You can do this by
changing the proxy settings every time, but it is somewhat tedious.
If you use a modern version of Firefox or Seamonkey,
you can also do it by setting up one profile to use the
proxy autoconfig script for tunnelling, and the other profile to
access the Internet directly (or however your ISP recommends).
Copying Files
You can copy files between your personal computer and the Statslab by
FTP. Our FTP server
is ftp.statslab.cam.ac.uk, and other Statslab computers will refuse
any attempts to FTP to them. You may already have a user-friendly
graphical FTP client installed on your machine, but if you don't, here
is the procedure for transferring files from the command line. The
commands are the same whatever operating system you are using.
- Open a Command Prompt window.
- Ensure that you are in the directory to which you want to copy the
Statslab files.
- Type ``ftp ftp.statslab.cam.ac.uk'' then give your username and
password when requested.
- You can use the ``ls'' and ``cd'' commands to move around your
Statslab directory until you've found the files you want to transfer.
- If you are transferring text files, which includes TeX and LaTeX
files but not *.doc or *.rtf files, type ``ascii''. If you are
transferring any other kind of file, type ``binary''.
- To copy a single file from the Statslab system to your machine,
use the ``get'' command. To copy more than one, use the ``mget''
command. The ``put'' and ``mput'' commands will copy files from your
local machine to the Statslab system.
- You can repeat the previous three steps if you need to transfer
more files.
- When you've finished, type ``quit''.
As an alternative to typing all these commands, Windows users can download WinSCP for free. Once you
have installed WinSCP, and connected to the Statslab by entering the
name of a Statslab
machine and your username and password, a list of your Statslab files
will be displayed in a window. You can copy them to your home machine
by dragging them, or simply open them by double-clicking as you would
for a local file. (N.B. This will not work for plain text files
unless they have the extension .txt.)