0% found this document useful (0 votes)
2 views4 pages

SSH Simple Users Guide

This document provides instructions for accessing lab machines via SSH and transferring files using SCP. Users are guided to connect to the lab computer by entering their DS username and password, and are informed about the initial connection warning. Additionally, it explains how to copy files to and from the lab machines and compile and run code on the remote server.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

SSH Simple Users Guide

This document provides instructions for accessing lab machines via SSH and transferring files using SCP. Users are guided to connect to the lab computer by entering their DS username and password, and are informed about the initial connection warning. Additionally, it explains how to copy files to and from the lab machines and compile and run code on the remote server.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Accessing lab machines with SSH.

Open Cygwin or CMD and enter the following: “ssh [email protected]

Replace “abc12345” with your own DS username

Enter your normal password

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:

“scp -r Documents [email protected]:Documents”

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.

We can then compile and run the code as we normally would:

You might also like