Accessing the lab machines
Quick Start
Warning
There are multiple accounts that you will use here. Don't get them mixed up.
- Your NUSNET account: this is the account you use for wider NUS services like email, etc.
- Your School of Computing (SoC) account: if you're not an SoC student or on exchange, see one of the later points on how to create this. This will be used to access GPU resources and SoC documentation.
- Your CS3210/CS3211 Lab Account: this is used specifically to interact with the CS3210/CS3211 cluster.
The following steps describe how to connect to CS3210/CS3211's lab machines. You will use these machines for tutorials and assignments.
-
Your initial credentials for the CS3210/CS3211 Cluster are based on your NUSNET ID and a password we sent to you via Canvas. Just remember this for now.
- Your username is your NUSNET ID (typically in the format
exxxxxxx, but can be different for exchange students and anyone that personalized their username) - Your initial password (will be reset later) can be found in a Canvas assignment called "CS3210/CS3211 Lab Password" as a comment.
- Your username is your NUSNET ID (typically in the format
-
If you are an exchange student or non-SoC student, you now need to make sure you have a School of Computing (SoC) Account.
- Go to https://mysoc.nus.edu.sg/~newacct to create your account.
- You will need your NUSNET ID and password for this (the credentials you use for your NUS email)
-
You now need to connect to the NUS School of Computing VPN (FortiClient VPN).
Warning
SoC VPN is not the same as the NUS-level VPN (i.e., do not use "PulseSecure" / "nVPN" / "Cisco VPN").
- Please follow the instructions at https://dochub.comp.nus.edu.sg/cf/guides/network/vpn/start. Log into this page using your SoC account credentials (not your CS3210/CS3211 Lab Account).
- The online Forticlient VPN installation might take a while. You may want to use the offline installer.
- By following these instructions, you should ultimately install the Forticlient VPN.
Warning
If you can't access this page (or it's hard to create an SoC account now for some reason), we have hosted the Forticlient installers for you here:
- Windows: https://drive.google.com/file/d/1Oc2TXGyI_44cNpuVjNU3q6vc2UMiXqB4/view
- Mac: https://drive.google.com/file/d/1Mh9vC6JW5n42-SA19JCRZtkshhV17S72/view
- Linux: you'll have to find .deb/.rpm/other packages for your system (they exist)
-
Before connecting to a lab machine, you will first need an SSH client on your machine
-
If you are using Windows, you can use PuTTY or (Windows Subsystem for Linux 2 (WSL)) https://learn.microsoft.com/en-us/windows/wsl/install.
Warning
We noticed that some WSL users can’t connect to the lab reliably while using the SoC VPN. We suggest a few alternatives in this case:
- Use Powershell - follow these instructions
- Or: look at the end of this guide for an alternative connection method using the SoC Jump Host here.
-
If you are using macOS or Linux, you can use the built-in
sshcommand on the terminal.
-
-
Now, choose one of the lab machines below to connect to (we call these login nodes). These are the available options for login nodes (may change throughout the semester)
soctf-pdc-001.comp.nus.edu.sg soctf-pdc-002.comp.nus.edu.sg soctf-pdc-009.comp.nus.edu.sg soctf-pdc-010.comp.nus.edu.sg soctf-pdc-021.comp.nus.edu.sg soctf-pdc-025.comp.nus.edu.sg soctf-pdc-026.comp.nus.edu.sgInfo
We didn't choose these names: it stands for "SoC Teaching Facilities - Parallel and Datacommunication Lab" :)
-
If you are using
ssh(if using WSL/Mac/Linux), enter the following command:ssh <lab username>@<hostname>, where<hostname>is one of the hostnames above. -
If you are using PuTTY, enter the hostname into the "Host Name" field, and click "Open".
Warning
Please connect to the cluster using
ssh/ PuTTY / some kind of terminal at the start. Using an editor (e.g., VSCode) will make it hard to reset your password during your first login.
-
-
You will be prompted for a password. Enter the password that you got on Canvas.
Note
You will not see the password as you type it. This is normal. Just type it in and press enter.
-
You will be asked to reset your password.
- You should see it ask for "Current Password": enter the password from Canvas.
- Then, it will ask for "New Password": enter a new password of your choice.
- Then, it will ask for "Confirm Password": enter the same password again.
Note
You will not see the password as you type it. This is normal. Just type it in and press enter.
-
You should now be connected to the lab machine. You can now run commands on the lab machine and use it for your labs and assignments.
Improving your "Quality of Life"
Using SSH keys
If you don't want to enter your password every time you connect to the lab machines, you can use SSH keys.
- Generate an SSH key on your local machine.
- If you are using Windows, you can use PuTTYgen to generate an SSH key.
- Please copy the public key that was generated.
- If you are using WSL, macOS or Linux, you can use the
ssh-keygencommand to generate an SSH key.- Find the public key (the file ending with
.pub) that was generated. It will likely be in~/.ssh/id_rsa.pubor~/.ssh/id_ed25519.pub.
- Find the public key (the file ending with
- If you are using Windows, you can use PuTTYgen to generate an SSH key.
- Depending on the machine you want to connect to without a password: your public key needs to be copied to that machine's
~/.ssh/authorized_keysfile.- If you're using Mac/Linux: you can use
ssh-copy-id user@hostto copy the key to that host -
If you're on Windows and not using WSL, you may have to use
scpto copy it manually, or ask your TA.Warning
If you created the
.ssh/authorized_keysfile yourself on thesoctfmachine, it may not work even after you've pasted in your key. Please make sure you run these two commands to set the permissions for those files/folders correctly:chmod 700 ~/.sshchmod 600 ~/.ssh/authorized_keys
- If you're using Mac/Linux: you can use
Using Editors like VSCode
Students typically prefer to connect remotely to our cluster using editors like VSCode. However, VSCode causes havoc on many HPC clusters because it constantly scans the filesystem, slowing it down for everyone.
If you must use VSCode, please use something like https://marketplace.visualstudio.com/items?itemName=Kelvin.vscode-sshfs (the SSH FS extension) instead of using the standard remote code development workflow.
If we find your VSCode instances using too much CPU / RAM / hogging the disk, we reserve the right to kill those instances.
Alternatives to using SoC's VPN
While the SoC VPN is the easiest way to connect to the lab machines (by far), it may not work for some, for certain reasons:
- Forticlient isn’t supported on your OS
- Note that it’s shown to be working on Ubuntu, Arch Linux, etc, so your OS has to be reasonably obscure for it not to work
- You find that the VPN is not stable enough over time
- Sometimes putting the computer to sleep will kill the VPN connection
- However - you should be running scripts in the background as much as possible to avoid issues with this
- Sometimes putting the computer to sleep will kill the VPN connection
- As mentioned earlier - issues with Windows and WSL
In these cases, you can use the SoC Jump Host - please follow SoC’s official instructions here: https://dochub.comp.nus.edu.sg/cf/guides/sjump/start.
Note
This workflow will require you to enter your password each time, but you can automate this by using the sshpass tool.
Just a reminder that this section is not necessary unless you find the original workflow problematic in some way.