Linux at Kenyon for COMP348

A Generic Linux system is available for you to use at IP address 138.28.162.108.
If your team will be developing it team project on Linux please ask the instructor to create a new Linux instance for your team to share (it will have a new IP address).

Each of you has a Linux account on this system:

  • Username: Your Kenyon username (the part of your email before the ‘@’).
  • Password: Your student ID (starting with a capital ‘S’).

Logging into Your Account

On macOS:

  1. Open a Terminal:
    • You can find Terminal in Applications > Utilities > Terminal.
  2. Connect via SSH:
    ssh yourusername@138.28.162.108
    • Replace yourusername with your Kenyon username.
    • When prompted, enter your password (your student ID starting with ‘S’).
  3. Generate an SSH Key: To simplify future logins and to enable secure access to GitHub, create an SSH key:
    • Run the following command to generate a 4096-bit RSA key:
      ssh-keygen -t rsa -b 4096 -C "your_email@kenyon.edu"
    • When prompted, press Enter to save the key in the default location.
    • You can add a passphrase or leave it empty.
  4. Add SSH Key to the SSH Agent:
    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_rsa
  5. Add Your SSH Key to GitHub:
    • Display the public key content:
      cat ~/.ssh/id_rsa.pub
    • Copy the output.
    • Go to GitHub’s SSH settings (log in if necessary).
    • Click on New SSH key, give it a title (e.g., “Kenyon Linux Server”), and paste your public key. Click Add SSH key.
  6. You can now ust git commands to clone, add, pull, push etc.

Using VSCode to Edit Remotely

  1. Install Remote Development Extensions:
    • Open Visual Studio Code (VSCode).
    • Go to the Extensions view (View > Extensions or press Cmd+Shift+X).
    • Search for Remote – SSH and install it.
  2. Configure VSCode for Remote SSH Access:
    • Open the Command Palette (Cmd+Shift+P).
    • Type Remote-SSH: Connect to Host... and select it.
    • Enter the SSH connection string:plaintextCopy codeyourusername@138.28.162.108
    • When prompted, enter your password or passphrase for the SSH key if configured.
    • Now you can open and edit files directly on the server through VSCode.

Editing with Nano on Linux

You can edit files directly in the terminal using the nano editor:

nano filename
  • Press Ctrl + X to save and exit.

On Windows 11 (Using Cygwin):

  1. Install Cygwin (If Not Installed):
  2. Open Cygwin Terminal.
  3. Connect via SSH:bashCopy codessh yourusername@138.28.162.108
    • Replace yourusername with your Kenyon username.
    • Enter your password (your student ID with ‘S’) when prompted.
  4. Generate an SSH Key (Same Steps as Above):
    ssh-keygen -t rsa -b 4096 -C "your_email@kenyon.edu"
    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_rsa
  5. Add the SSH Key to GitHub:
    • Copy the SSH key using:
      cat ~/.ssh/id_rsa.pub
    • Go to GitHub SSH settings and add the key as described above.
  6. You can now ust git commands to clone, add, pull, push etc.

Setting Up VSCode for Remote Editing

  1. Install Remote Development Extensions:
    • In VSCode, go to the Extensions view (Ctrl+Shift+X).
    • Search for Remote – SSH and install it.
  2. Configure VSCode to Connect Remotely:
    • Open the Command Palette (Ctrl+Shift+P).
    • Type Remote-SSH: Connect to Host... and select it.
    • Enter: yourusername@138.28.162.108
    • When prompted, enter your password or SSH key passphrase.
    • You can now open, edit, and manage files on the Linux server through VSCode.

Additional Tips

  • Cloning GitHub Repositories: After setting up SSH access, you can clone repositories securely:
    git clone git@github.com:username/repository.git Replace username and repository with the relevant GitHub details.
  • Executing Linux Commands: Familiarize yourself with basic Linux commands like ls (list files), cd (change directory), cp (copy files), and mv (move/rename files).

This setup provides you with a secure and efficient way to work on projects hosted on the Kenyon Linux server, including using Git, editing code, and performing remote development tasks.

Scroll to Top