Department of Mathematics

Math 300: Mathematical Computing

Remote Access Cheat Sheet

In the bad old days, people could work on computers far away by using protocol/client systems called telnet and ftp. These were (and are) desperately insecure, inasmuch as all traffic associated with them passes unencrypted over the Internet, where it could be intercepted, stolen, or altered at will by crackers between the source and destination. In modern times, data are encrypted to avoid this problem. The standard suite of protocols for this is called SSH (Secure SHell).


Secure Shell is used to run a command line on a remote machine. The "ssh client" runs on your local machine, while the remote machine must run an "ssh daemon" - a server. The server listens for connections, and when one is requested, sends a key code to the client to identify itself. If the credentials supplied by the server match those the client has stored, then the session is started and the user identifies herself using a login name and password (or in one of several other ways).

There are two ssh protocols: ssh1, which uses 56-bit encryption (this means that the public keys can be expressed in 56 binary digits) and is susceptible to some attacks, and ssh2, which uses 128-bit encryption and is much safer.

Unix and OS X

Typically the command looks like



ssh -2

The latter command forces the client to try the ssh2 protocol first.


One must run an ssh client from the "Start" menu. At WSU we use an excellent free client called "Putty". See the page for details and references. The official download site for this is at chiark.greenend. Go figure.


Secure FTP (sftp) performs file transfers through an encrypted tunnel. While "encrypted tunnel" would make a terrific name for a metal band, in this case it means that all file transfers are encoded, so that the information in them cannot be understood by anyone intercepting it. To use it, you again need client software on your local machine, and an ssh server that supports sftp on the remote machine. While there are many client packages (for example, Linux people can use gFTP - use the SSH2 protocol in the upper right of the screen), in the simplest setting the interface is a command line. A free client for this is available at the page given in the link above. A typical session follows (with comments on the tasks performed in green).

open the ftp session >open
list the contents of the remote directory >ls
change the remote directory >cd newdirectory
change the local directory >lcd mydirectory
put a file on the remote machine >put myfile remotefile
get a file from the remote machine >get remotefile
close the session >exit

Note that after you transfer a file, in order to make it public (so people can see it on the web) you may need to use ssh to go to the remote machine and change the access using a command such as

chmod go+rx remotefile

This command allows others to read or execute your file.

There are some nice GUI packages available. Filezilla is an excellent example, available for Linux, Windows, and Mac. Windows users can also choose to use WinSCP.


There is a second way to transfer files using SSH, called SCP (Secure CoPy). There is really little difference in the background details between this and sftp, but the appearance to the user is significantly different. In particular, the scp command works very like the cp (copy) command of Unix. For example, to copy a file called myfile.txt that resides on a computer named to the current directory, one could type a command of the form

scp .

Assignment C is posted.

The test solution is available.

Department of Mathematics, PO Box 643113, Neill Hall 103, Washington State University, Pullman WA 99164-3113, 509-335-3926, Contact Us
Copyright © 1996-2015 Kevin Cooper