Skip to main content

Setup: SSH to Server

In order to start the assignment, you will need to connect to the server via SSH using your individual account. The server address is kayle.snu.ac.kr, and each student will be assigned a unique SSH port number (your port number will be announced later).

You can use one of two methods to connect to the server: either (i) using terminals or (ii) using VS Code. If you encounter any issues, please contact TAs.

Initial Password
  • After connecting to the server for the first time, it is important to change your initial password. The initial password is your student ID (e.g., 20XX-XXXXX).
  • After logging into the server, you should change your password immediately.
Run your own docker

If you are (or want to be) familiar with Linux, we strongly recommend you run your own docker! This would significantly save the server resources for your classmates, and you don't need to suffer from the sluggish remote server. If you will run the local docker, please follow the instuctions here.

1. Using terminals to connect to the server

On Windows: Using Windows Terminal

  1. Open Windows Terminal.

  2. Enter the following command to connect to the server:

    ssh compsec@kayle.snu.ac.kr -p [port]
    • Replace [port] with your assigned SSH port number.
  3. Press Enter and type your password to log in.

On Mac / Linux: Using Terminal

  1. Open the Terminal.

  2. Enter the following command to connect to the server:

    ssh compsec@kayle.snu.ac.kr -p [port]
    • Replace [port] with your assigned SSH port number.
  3. Press Enter and type your password to log in.

2. Using VS Code to connect to the server

We recommend using Visual Studio Code (VS Code) with the Remote - SSH extension to connect to the server link. VS Code can be used for almost all operating systems, including Windows, Mac, and Linux.

Step-by-Step Guide

  1. Install Visual Studio Code

    • If you haven't already, download and install VS Code from the official website.
  2. Install the Remote - SSH Extension:

    • Open VS Code.
    • Go to the Extensions view by clicking on the square icon in the sidebar or typing Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac).
    • Search for Remote - SSH and click Install.
  3. Open the Command Palette:

    • Open the Command Palette by typing Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac).
  4. Connect to Host:

    • In the Command Palette, type Remote-SSH: Connect to Host... and select it.
    • Enter the following SSH command:
    ssh compsec@kayle.snu.ac.kr -p [port]
    • Replace [port] with your port number.
  5. Configure SSH Configurations (Optional):

    • If you connect to the server frequently (highly likely you will!), you can configure your SSH settings in the configuration file for easier access:
      • Windows: Create or edit the SSH configuration file located at C:\Users\[username]\.ssh\config.
      • Mac/Linux: Create or edit the SSH configuration file located at ~/.ssh/config.
    • Add the following configuration:
    Host class-system-programming
    HostName kayle.snu.ac.kr
    User compsec
    Port [port]
    • Replace [port] with your port number.
    • After adding this configuration, you can connect using class-system-programming instead of typing the full command each time.
  6. Enter Your Password:

    • After entering the command, you will be prompted to enter your password. Type your password and press Enter.
      • The initial password is compsec
  7. Successful Connection:

    • Once connected, you will see a new VS Code window open that is connected to the remote server. You can now work directly on the server as if it were your local environment.
Attention

When using Visual Studio Code, be aware that the password prompt can appear at the top-center of the window multiple times. Ensure you respond to each prompt; otherwise, the connection will fail.

3. Change Your Password

Once you get connected to the server, you should change the password immediately for security reasons. Once logged in, change the password by typing the following command:

passwd

You will be prompted to enter the current password (compsec) and then set a new password of your choice. Make sure to choose a strong and secure password.

4. Resource Constraints of Container

Please note that the container running your connection is restricted to use the following resource limits:

  • CPU Cores: 4 cores
  • Memory: 8 GB
  • Storage: 16 GB
Grading will be using this container

These resource constraints are important because our grading system will evaluate your assignments using a container with the exactly same constraints. Therefore, ensure that your application is optimized to run efficiently within these limits. If your application needs to use more than these resource constraints, it may not perform as expected, which may downgrade your scores/grades.