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

For ssh connections to the SCF, you can use a free program called putty. The putty executable is a single file, so it can be stored wherever you find it convenient. When you execute putty, you'll see the "Session Window"; type in a valid host name, and click the "Open" button at the bottom of the window. At this point you'll be prompted for a password. You also have the option of naming and saving your session to make it easier to connect the next time.
Note that putty alone will not let you view graphics windows on your remote computer - for that, you'll need an X Windows emulator. If you have a CalNet ID, you can download Exceed from UC Berkeley Software Distribution. Note that if you wish to view graphics using putty you must set up X Windows forwarding; click on the plus sign to the left of "SSH" in the left hand pane, then click "X11" and check the box labelled "Enable X11 Forwarding".
An alternative to the two programs mentioned above 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.

3  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.

4  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.

4.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 s244x, you would be able to access your files on the SCF computers by going to
sftp://hostname.berkeley.edu/class/g/s244/s244x

4.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.

4.3  Microsoft Windows

There are a number of free graphical file transfer clients available for Windows; one nice and easy-to-use one is WinSCP. After logging in to a remote system, you can drag and drop files between the local and remote computers.

4.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.

4.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 2008, 08:55.