Using SSH for Homework and Projects
ssh, or "secure shell", lets you securely log into other machines,
usually running Linux, UNIX, or Mac OSX.
Logging into a System with SSH
- Linux and Mac OSX
On Linux and Mac OSX the ssh client is usually installed by default.
To log into another machine just run
at a shell terminal prompt
(where username is your username on the remote machine,
and HOSTNAME is the name or IP address of the remote machine).
You will be prompted for a password, and after you
enter it you will be logged in.
Windows does not include an ssh client. A free client I have used
PuTTY. Download a binary from that page and run it; it will
prompt you for a username and hostname and log you in to the system.
The program should look something like this:
In the HostName field put the hostname given out in class
If the instructions specify a non-default port (i.e. 2131) put
it in the Port field. Make sure SSH is selected under Protocol,
and click open.
It should then prompt you for your username and password.
Copying Files over SSH
On a Linux or Mac OSX machine you can use the "scp" command to copy
files to and from a remote machine using the ssh protocol. For
example, you can do
"scp username@HOSTNAME:project_1.tar.gz ."
which will copy the file project_1.tar.gz from your home directory
on HOSTNAME to the local directory on your current computer (after
entering your password). You can do the reverse,
"scp project5.tar.gz username@HOSTNAME:"
will copy project5.tar.gz from your local machine to your home directory
on HOSTNAME. You can specify subdirectories and the like when giving
the path to the project involved.
It is often inconvenient to do complex SCP commands. There are GUIs that
make this easier. One free scp/sftp client I have used on Windows is
WinSCP which gives a GUI
interface for transfering the files back and forth.