Workspace Setup

Setting up Development Environment

C programming is very platform dependent. The compiler, machine hardware and operating system can have significant impact on the the execution of your code. To provide a standard platform for you to develop on and for us to grade on, the course is going to be utilizing the servers provided by SEAS. We will be using VS Code, a (powerful) cross-platform text editor, to enable you to develop on the remote machine easily. We are providing this setup information as a recommendation, however, you are free to use any workflow you prefer - but remember that the grading environment will be identical to that provided by the SEAS servers.

This setup is primarily designed for Windows 10 and MacOS, Linux users may follow it as well. You will need a terminal application to run some basic commands. Below are terminal applications available on the different operating systems.

Operating System Terminal Application
Windows 10 Powershell, CMD, Windows Terminal
MacOS Terminal, iTerm2

The setup will have the following steps.

  1. Creating a SEAS Account
  2. Getting connected using UCLA VPN
  3. Downloading VSCode
  4. Setting up VSCode for Remote SSH
    • SSH configuration
    • Using the terminal on the Remote Host

Step 1: Creating a SEAS Account

WARNING! This process can take a few days! Get started early!

If you do not have a SEAS Account, you can apply here. You can also visit Boelter 2664 and request the staff to create one for you.

Step 2: Getting connected using UCLA VPN

To connect to the SEAS servers, you need to be on the UCLA VPN. We recommend that you use the CISCO client, however, you can follow the instructions for other setups as well. The instructions for downloading, installing and setting up the VPN can be found here.

Note: If you are using Linux you will have to set up L2TP. Trying finding instructions for your preffered distro and following the UCLA set up found here.

Please reach out to the course staff if you have difficulty setting up the VPN connection.

Once you have both your SEAS account and the Cisco VPN, you can try logging into the remote using the credentials provided to you by the SEAS administrators. Run the following command in your terminal application replace user with the username that SEAS set you up with.

$ ssh

If this is the first time you’re connecting to the server, you will be prompted with the following:

$ ssh
The authenticity of host ' (' can't be established.
ECDSA key fingerprint is SHA256:kk4Uglj/TTk9Be7q7acNGSjdV1Sk+bsymPopyskF9H4.
Are you sure you want to continue connecting (yes/no)?

Type in yes and continue. You will then be prompted to enter your password (output may vary).

$ ssh
The authenticity of host ' (' can't be established.
ECDSA key fingerprint is SHA256:kk4Uglj/TTk9Be7q7acNGSjdV1Sk+bsymPopyskF9H4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ',' (ECDSA) to the list of known hosts.'s password:

Enter the password that SEAS administrators provided you and continue. You should see an output similar to the one below.

Last login: Tue Oct  6 18:28:18 2020 from
               RHEL 7

        * User processes older than 36 hours will be cleaned up

* SEASnet Computing Access                                                  *
*                                                                           *
* Priority is given both on the servers and in the student labs to those    *
* students doing coursework. Computing support for research is provided by  *
* each department.                                                          *
* For assistance please contact or call 206-6864.        *
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "C.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
[user@lnxsrv06 ~]$

If this worked, you have successfully been able to log into the SEAS server and you can continue with the setup. Otherwise, please reach out to the course staff for help.

Step 3: Downloading VS Code

VS Code can be downloaded from here. The set up is pretty straight forward, however, if you have any difficulties installing, please reach out to the course staff for assistance.

Step 4: Setting up VS Code for Remote SSH

While VS Code can be used to edit text locally, we will focus on how to use it as a Remote SSH Client. To enable this you need to download the Remote-SSH extension to VS Code. You can follow the following steps to install the Remote SSH extension:

  1. Open VS Code
  2. Open the extensions pane (View > Extensions)
  3. Search for “Remote - SSH” in the extension pane, this should be the first result, however, you can find it here and install it. The Remote SSH extension page has a good tutorial how to set up and use it, however, we will cover the basic features you will need in the rest of this setup.
  4. Open the Command Palette (View > Command Palette) and type in and select “Remote SSH - Add New SSH Host”.
  5. Enter the following ssh command. Remember to replace user with your assigned username.
  1. You will then be asked to update a configuration file, pick the first item in the dropdown menu.
  2. On the bottom right, you will see a pop up saying “Host added!”, click “Connect”.
  3. You will be prompted to enter your password.
  4. Upon successful connection, in the bottom left corner of VS Code you will be able to see: SSH:
  5. Click on “Open folder” on the welcome page and you can navigate the remote server to open the folder you choose. Once you have selected a folder, the window will reload - this is normal behavior. You can then edit the files as normal and your changes will be saved to the remote host directly.
  6. Open the terminal in VS Code (View > Terminal). This terminal window is connected to your remote machine and you can run the wget commands in the labs to download the base code files directly on to the server using this terminal. You can also run all the compilation and debug commands in this window.

Troubleshooting and FAQs

My VSCode doesn’t launch the remote host :(

Check the following:

If both of the above are true, please reach out to the course staff for assistance.