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 sitehosts
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
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). Versions of
the operating system from Panther on
provide an installation package for X11 on the Developer Disk (X11User.pkg).
3.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-server, xorg-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 there should be a Cygwin icon
on your desktop. Double click on the Cygwin icon and type
/usr/bin/startxwin.sh
in the window that opens. Another window will open and you can
use the ssh command as described below. (Notice when you use Cygwin,
there's no need for the putty program, since Cygwin provides the ssh
command.)
3.4 Commands
3.4.1 Microsoft Windows: putty
To use putty with an X Windows emulator, you need to make one
change to the default settings: In the left-pane, click the X
to the left of SSH under Connections, and click on
X11. Check the box marked "Enable X11 forwarding".
Once this is done, you can connect to the SCF by choosing "Session"
in the left hand pane, filling in a valid hostname, and clicking "Open"
3.5 Linux and Mac: ssh
To connect to the SCF computers, use a command like this in the terminal:
ssh -X s243xx@hostname
where s243xx is your SCF class account, and
hostname is one of the SCF computers.
The -X flag allows tunneling of X11 connections so that you
can view graphics from the SCF computers.
Don't forget to
include .berkeley.edu after the hostname if you're
connecting from outside the Berkeley domain.
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.
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
There are 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 C files from the home directory of your SCF account, to the current
directory on
your local computer,
use a command like:
scp username@hostname:\*.c .
File translated from
TEX
by
TTH,
version 3.67.
On 2 Sep 2009, 00:44.