Connecting Remotely to the Statistical Computing Facility

1  Introduction

In order to access 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 run programs which open windows to display images or provide a nicer user interface, for example graphics windows from R, or the SAS display manager. 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 an explanation of the commands necessary to connect to the SCF and run the programs you need. Finally, information on transfering files from the SCF to your local computer is presented.

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; even with a broadband connection, some programs may seem nonresponsive at times. With patience, you should be able work remotely with few problems.

2  Usernames and Hostnames

In the examples that follow, the username you should provide is the login name for your SCF account. Running the stathosts command will provide you with a list of computers to which you can remotely login. Remember that outside the Berkeley domain, you must add ".berkeley.edu" to the end of the hostname in order to connect.

3  Software

3.1  Linux

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

3.2  Mac OS X

The ssh command is available through the Terminal application (available in /Applications/Utilities/Terminal.app). Panther provides an installation package for X11 on the Developer Disk. It can also be found on the Apple web site.

3.3  Microsoft Windows

If you have a CalNet ID, you can download two programs from UC Berkeley Software Distribution: Exceed 9.0, an X Windows emulator, and SSH Secure Shell 3.2.9, for secure connection. You can install these programs using default settings, but you must set up X11 Tunneling in the SSH program the first time you open it by choosing Edit -> Settings and selecting Tunneling in the left hand pane of the window that opens. Then, in the right hand pane, check the box marked Tunnel X11 Connections. These programs should install icons on the desktop, which you can double click to activate.

A free 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.

If you don't need any of the X windows features of a secure connection to the SCF, putty is a small, free program that makes it very easy to connect to other computers through ssh.

3.4  Commands

3.4.1  Microsoft Windows: SSH Secure Shell 3.2.9

Once tunnelling has been enabled and Exceed has been started, double clicking on the SSH Secure Shell Client icon will open a terminal window; click Quick Connect, and a window prompting for hostname and username will appear. Leave the other options at their default values. When you're connected, you can start typing commands just as if you were sitting in front of an SCF workstation.

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 SCF documents on your own (non-SCF) 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. Before transfering files, make sure that you can print them on the computer you're transfering them to. PostScript (.ps) files often cause problems. If you want to print a PostScript file, and you're not sure if your program has the necessary software, run the following command on the SCF system:

ps2pdf filename.ps

where filename.ps is the name of the file you'd like to print. You can then copy the resulting pdf file to your computer and view or print it with Adobe Acrobat.

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.

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

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.

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 in an ssh window connect to an SCF computer:
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, 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 SAS files from the home directory of your SCF account, to the current directory on your local computer, use a command like:

scp username@hostname:\*.sas .




File translated from TEX by TTH, version 3.13.
On 23 Sep 2004, 09:27.