Windows Users Guide

This guide is intended to help you setup a Windows environment using WinSCP in order to complete assignments and exercises for NWEN241 remotely. For the purposes of this course we encourage students to write and edit code using a text editor and compile using the command line, as opposed to using an IDE. This document is designed with this in mind. If you have trouble setting up, contact your tutors.

Setup

Ensure that you have the latest version of WinSCP. You can download and install the latest stable version from the official site https://winscp.net.

We also recommend installing a text editor with syntax highlighting and improved quality of life features to make completing assignments easier. Our recommendations include: We do not recommend using text editing tools such as Vim or Emacs if you do not already have experience with them, due to their steep learning curve.

Connection

On starting up WinSCP you will be asked to login to a server. To connect to the ECS systems, in HostName field use barretts.ecs.vuw.ac.nz or greta-pt.ecs.vuw.ac.nz. These are ECS servers that are available to all students and staff. Then enter your username and password for your ECS account.

image1.png

Editing

Double-clicking a text file will open it up in default editor. If you have not set a default editor the WinSCP text editor will be used, which is very similar to notepad. Other text editors (such as Sublime Text) may also be listed as an option to open the file with. To manually open the file with another text editor, use Right click -> Edit -> Edit With... and select the text editor of your choice.

image2.png

image3a.pngimage3b.png

Opening a file this way creates a temporary file on your machine. When you save using your text editor, WinSCP will automatically make the changes to the file on the server. This effectively means you can make, edit, and save files on the ECS system, all through WinSCP.

image4.png

Alternatively you could create and edit files on your local disk, then manually copy them over to the ECS server through WinSCP, but this can be a tedious back and forth process and opens up the possibility of more things going wrong.

Compilation

In order to compile the program remotely on the ECS systems you must first connect to server at the University. From there you can follow the same steps you would normally use to navigate directories and compile your program.

Option 1: Putty, through WinSCP

To compile the program remotely, you can connect to the server and relay commands using PuTTY. To open PuTTY you can click the “Open session in PuTTY” button on the navigation bar, use Ctrl+P, or go to Commands -> Open in PuTTY. If you do not have PuTTY installed, you can download from the following sources: image5a.png

image5b.pngimage5c.png

When opened, PuTTY should be in the same directory as you opened it from. If not, you can navigate to the correct directory using the commands ls and cd (as you would navigate in a Linux terminal). Once you are in the correct directory you can compile your programs normally using gcc commands. All output from compiling and executing the program will appear in the terminal.

Option 2: SSH, through Windows Command Prompt

Alternatively you can use Secure Shell (SSH) manually through the Windows command prompt (or PowerShell). First open the command prompt, then enter the following command, substituting in your ECS username and the server you wish to connect to:
ssh <username>@<server>

For example, the command may look like this
 ssh smithjohn@barretts.ecs.vuw.ac.nz 

You will be prompted to enter your password and from here you can follow the directions given in the previous section about navigating to the correct directory and compiling your program.

image6.png