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.
- 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.
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
-
Open Windows Terminal.
-
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.
- Replace
-
Press Enter and type your password to log in.
On Mac / Linux: Using Terminal
-
Open the Terminal.
-
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.
- Replace
-
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
-
Install Visual Studio Code
- If you haven't already, download and install VS Code from the official website.
-
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) orCmd+Shift+X
(Mac). - Search for Remote - SSH and click Install.
-
Open the Command Palette:
- Open the Command Palette by typing
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(Mac).
- Open the Command Palette by typing
-
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.
- In the Command Palette, type
-
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
.
- Windows: Create or edit the SSH configuration file
located at
- 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.
- If you connect to the server frequently (highly likely you
will!), you can configure your SSH settings in the configuration
file for easier access:
-
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
- The initial password is
- After entering the command, you will be prompted to enter your
password. Type your password and press Enter.
-
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.
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
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.