Linux SSH & SCP

SSH (connecting to cluster)

You can use the program PuTTy to connect, or any linux command line program such as Mac’s Terminal, or Cygwin (Windows). You will need to connect to, using your username and password. On the command line, it looks like this:

ssh <username>

SCP (copying files)

To move files to/from the cluster, you can use scp. WinSCP is a graphical interface you can use to connect to and transfer files. Or, you can use scp on the command line. For transferring files in your current directory to ocha:

scp <filename> <username>

filename can use wildcards. For instance, to transfer all C files in the directory, you can type “*.c” as your filename.

The . after the colon states that you are transferring to your home directory. If you wish to transfer to a directory within your home directory, replace it with that path. For instance, to transfer to my simulations/predprey folder, I would put “simulations/predprey/.” after the colon.

To transfer an entire folder, you can put “-r” before the filename. Otherwise you’ll get an error that you can’t transfer a folder.

To transfer files from ocha to your own computer, you can run the command on your computer with the destination and source swapped (in this example, copying to current directory on own computer):

scp <username><file to copy> .