SSH Simple Users Guide
SSH Simple Users Guide
And you’re in. The first time you connect, you may receive the following warning:
This simply means your computer hasn’t connected to this address before, and does not a cause for
concern. Check that the address is correct, then type “yes”.
Running code on the lab machines.
Say I have this file on my own pc:
Here it is in Cygwin:
I’d like to transfer this to the lab computer and run it there. The simplest way to do it is to use
“scp”, the secure copy. This uses two parameters, which we can think of as “source” and
“destination”. It copies the file or files at the source address to the destination address, and either of
these can be local or remote addresses.
This simple case copies from fizzbuzz.c in our current working directory to the desired remote
directory.
Logging in after running scp, we can see “fizzbuzz.c” has appeared on the remote side. We could
have aimed for a specific folder on the remote server, for example the Documents folder like so:
“[email protected]:Documents/fizzbuzz.c”. You can copy an
entire folder as well using the “-r” option:
You can also do this the other way around, copying from the remote computer to your own, but
your PC is likely to have security features in place which may make this difficult.