Swarthmore College Department of Computer Science

remote access/using ssh

If you want to connect to the CS machines from your dorm room or home, you will need the ssh program on your machine (i.e., an ssh client). ssh stands for Secure Shell. It is considered secure because all communications done through ssh are encrypted. This means anyone monitoring the network traffic (i.e., sniffing) will only see encrypted text going by, and not what you are actually typing (like your password).

If you want to transfer files to or from the CS machines, you will need either scp or sftp, which are secure versions of the copy (cp) and file transfer (ftp) programs.

How to get and use these programs depends on what operating system you are using:

Linux/Unix

If you're running Linux on your home computer, just open up a terminal window and run ssh from the command line:

ssh -X uname@lab.cs.swarthmore.edu

(change uname to your ITS username). You should also be able to use scp or sftp right from the command line. See below for some examples of this.

Mac OS X

For mac users, you can open a Terminal, or start X11, which also gives you a terminal with a command line. The advantage of using X11 is the ability to display pop-up windows (like the graphics window used in CS21, or the drscheme window used in CS37) back to your home machine. Once you have a terminal window, use ssh as above but use the -Y option:

ssh -Y uname@lab.cs.swarthmore.edu

See here if you want gory details about the -Y option.

Also, see here about using XQuartz to get forward graphics from the lab CS machines to your laptop.

NOTE: for newer macs, X11 is no longer installed by default. Go to this site to download and install X11 on your mac: http://support.apple.com/kb/HT5293

Windows

For Windows you need to download the putty ssh client, and WinSCP if you want to transfer files:

For putty, go to the Download section and get the putty.exe file. For WinSCP, also go to the Download page and look for the "Installation package". Here are some screenshots and help for using putty and scp.

Note: for windows, Xming must be installed in order to display display pop-up windows (using putty) on your home or dorm machine. Follow the installing Xming guide if you're doing something that requires graphics windows (like drscheme in CS37 or using the graphics.py stuff in CS21).

ssh and scp Examples

Below are some examples of using the command-line versions of ssh and scp.

log in to sccs from a cs machine:

   lime$ ssh yoursccsusername@sccs.swarthmore.edu
   Host key not found from the list of known hosts.
   Are you sure you want to connect (yes/no)? yes
   Host 'sccs' added to the list of known hosts.
   user@sccs.swarthmore.edu's password: 
   Last login: Tue Sep  7 09:34:01 1999 from lemon
   heron% 

starting on an sccs machine, copy a file to cs:

   heron$ scp prog.py user@lab.cs.swarthmore.edu:.
   user@lab.cs.swarthmore.edu's password: 
   prog.py  100% |***************| 13027     00:01    
   heron$ 

starting on home machine, copy a file from cs:

   $ scp user@lab.cs.swarthmore.edu:cs21/labs/02/zeno.py  .
   user@lab.cs.swarthmore.edu's password: 
   zeno.py   100% |***************| 3137     00:04    
   $ 

If you have problems getting these programs to work, please let us know at local-staff at cs.swarthmore.edu.