Accessing the Statistical Computing Facility Remotely

1  Introduction

In order connect to the SCF from a remote (non-SCF) computer, you must have a program which uses the secure shell (SSH) protocol to communicate with other computers. An SSH program alone will not allow you to view graphics or images remotely. For these purposes, you need an X Windows server (sometimes known as X11) either running natively on your computer, or via an X Windows emulator.
Depending on your operating system, one or both of these programs may already be installed on your computer. The next section will explain how to obtain the necessary programs if they are not already available, followed by information on transfering files from the SCF to your local computer.
If you don't have a broadband connection, you may find that the response when using X Windows remotely may be too slow to be useful; but with patience, you should be able to access the SCF remotely with few problems.

2  Software

2.1  Linux

Linux natively runs the X Windows system, and most Linux systems have the ssh program available to securely connect to remote systems.

2.2  Mac OS X

The ssh command is available through the Terminal application (available in /Applications/Utilities/Terminal.app). For versions of Mac OS X since Panther, there is an installation package for X11 (X11User.pkg) on the Developer Disk.

2.3  Microsoft Windows

To connect to the SCF remotely, you can use a free program called putty. You can download it from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html This will allow you to run programs remotely, but it will not allow you to use the display manager, or to view graphics. To do this, you need an X Windows emulator. If you have a CalNet ID, you can download Exceed 2008 from UC Berkeley Software Distribution A free alternative to Exceed is the Cygwin X Windows System. There are excellent instructions for installing this software at Cygwin/X. Basically, you first download a program called setup.exe, which makes it possible to install a wide variety of software; you need choose only four packages: xorg-x11-base, X-startup-scripts, inetutils and openssh (Clicking on the View button in the setup.exe window until it displays "Full" makes it easier to find the packages you need). Once everything is installed you can double click on c:\cygwin\usr\X11R6\bin\startxwin.bat to start the system. A terminal window will open, and you can use the ssh command as described below. The User's Guide covers just about every step of installation and use of the software.

2.4  Commands

2.4.1  Microsoft Windows: putty

To connect to a remote host using putty, click on the Session category in the left-hand pane of putty's window, and enter the hostname in the appropriate box. Click Open, and a terminal will appear, prompting for you login name and password.
To display graphics through putty, you need to activate X11 Forwarding. In the left hand pane of putty's window, click on the plus sign near SSH under the Connection category. A choice of X11 should appear; click on it, and check the box labeled Enable X11 forwarding. Once forwarding has been enabled (you should only need to do it once), and Exceed has been started, graphics programs on the remote host will display on your computer.

2.4.2  The ssh command

If you're using a system with the ssh command, type
ssh -X username@hostname

to connect to an SCF computer. The -X (upper case X) in the ssh command sets up the X11 Tunneling necessary for displaying graphics.

3  File Transfer

If you want to print out your programs, listings and graphics on your local printer, the easiest route is to copy the files from the SCF computers to your computer and then to print them in the usual way. The best way is to use a file transfer program on your local computer, although other means are possible.

3.1  Linux

The command line scp command, described below, is probably the best way to transfer files from one computer to another. If you'd prefer a graphical client, programs like konqueror will accept the sftp:// protocol. For example, if your username is s133xy, you would be able to access your files on the SCF computers by going to
sftp://hostname.berkeley.edu/class/u/s133/s133xy

3.2  Mac OS X

The command line scp command, described below, can be accessed through the terminal (/Applications/Utilities/Terminal.app). Although the finder doesn't directly support the sftp protocol, the freeware program Fugu provides a nice graphical frontend to the sftp command. To use Fugu, enter your username and an appropriate hostname in the Connect to: field; you'll be prompted for a password when Fugu connects to the remote server. Your remote files will appear in Fugu's right-hand pane, where they can be dragged and dropped to a location of your choice in the (local) left-hand pane.

3.3  Microsoft Windows

If you've installed the SSH Secure Server software, there should be a desktop icon labeled SSH Secure File Transfer Client. Double click on the icon, and click on Quick Connect, and a window prompting for hostname and username will appear. Leave the other options at their default values. Once you're connected, your remote (SCF) files will appear in the right hand pane; you can drag and drop them to a suitable local location.
There are also a number of free graphical sftp clients available for Windows; one nice and easy-to-use one is WinSCP. If you choose the Explorer view instead of the default Norton Commander view, your SCF account will appear as a normal explorer window, allowing you to drag and drop files; simply enter your username and a suitable hostname to connect.

3.4  If All Else Fails

If you can't use the previously described methods, you can email files from the SCF system to an email account of your choice. One way is to use the command line program pine. To send files as attachments with pine, enter the following command:
pine emailaddress -attach file1 -attach file2 ...

After hitting Return, type control-X to send the mail, and Y to confirm it. Note:  There is a 5 Mb limit on attachments to emails sent through the SCF. While this should pose no problems with text files saved from the program editor, complex graphics may be too large to send through email. Please check the size of the file you're sending (with the UNIX command ls -l) before reporting a problem.

3.5  The scp command

The syntax for the scp command is:
scp username@hostname:file local-directory

You'll be prompted for your password; after entering it and hitting Return, the file transfer will start.
To use wildcard patterns on the remote (SCF) machine, precede the wildcard character with a backslash (\). For example to copy all the pdf files from your SCF account, to the current directory on your local computer, use a command like:
scp username@hostname:\*.pdf .




File translated from TEX by TTH, version 3.67.
On 23 Jan 2009, 15:57.