VS Code + Ubuntu Class Server + GitHub Classroom
This guide walks you through the exact setup we will use in this course.
You will:
- Log into the Ubuntu class server using your temporary password
- Generate a 4096-bit SSH key on the server
- Copy that key to your laptop so VS Code can connect
- Install VS Code and configure Remote-SSH
- Add the server key to GitHub (trust relationship)
- Clone your GitHub Classroom project on the server
- Run the server on your assigned port
- Verify it in a browser and make a required edit
Do the steps in order.
Server and Port Information
- Ubuntu class server:
10.192.145.179 - Initial Linux password: your student ID
- Your port:
41XX
(`XX = last two digits of your student ID — there are no duplicates)
Example:
Student ID ends in 07 → port is 4107
Part 1 — Log into the Ubuntu server (first time)
macOS (Terminal)
Open Terminal and run:
ssh yourUsername@10.192.145.179
Windows (PowerShell)
Open PowerShell (or Windows Terminal) and run:
ssh yourUsername@10.192.145.179
When prompted for a password, enter:
your student ID
You should see a prompt like:
yourUsername@ubuntu:~$
From this point on, commands are run on the Ubuntu server, unless stated otherwise.
Part 2 — Generate a 4096-bit SSH key (on the server)
On the Ubuntu server, run:
ssh-keygen -t rsa -b 4096 -C "your_email@kenyon.edu"
When prompted:
- File location → press Enter
- Passphrase → press Enter (recommended for class servers)
Start the SSH agent and load the key:
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa
This key will be used for both VS Code Remote-SSH and GitHub.
Part 3 — Copy the server’s public key to your laptop
Still on the Ubuntu server, display your public key:
cat ~/.ssh/id_rsa.pub
- Copy the entire line
- It starts with
ssh-rsa - Do not add spaces or line breaks
You will use this key in two places:
- VS Code (via SSH)
- GitHub (for repository access)
Part 4 — Install VS Code on your laptop
On your laptop:
- Go to
https://code.visualstudio.com/ - Install VS Code (macOS or Windows)
- Launch VS Code
Part 5 — Set up VS Code Remote-SSH (laptop)
Install the extension
In VS Code:
- Open Extensions
- Install Remote – SSH (Microsoft)
Add the server
- Press
Cmd+Shift+P(macOS) orCtrl+Shift+P(Windows) - Run: Remote-SSH: Add New SSH Host
- Enter:
ssh yourUsername@10.192.145.179
- Accept the default SSH config file
Connect
- Run: Remote-SSH: Connect to Host
- Choose
10.192.145.179
VS Code opens a new window connected to the server.
Part 6 — Add the SSH key to GitHub (trust relationship)
On your laptop browser:
- Log into GitHub
- Go to Settings → SSH and GPG keys
- Click New SSH key
- Title:
Kenyon CS Ubuntu Server - Paste the key you copied from
id_rsa.pub - Click Add SSH key
Back on the Ubuntu server, test GitHub access:
ssh -T git@github.com
First time only, type:
yes
Success looks like:
Hi <github-username>! You've successfully authenticated.
Part 7 — Accept the Classroom assignment and clone the repo
In your browser, go to:
https://classroom.github.com/a/dyR_3w0A
Accept the assignment.
GitHub will show your personal repo.
On the Ubuntu server:
mkdir -p ~/projects cd ~/projects git clone git@github.com:ORG/REPO.git cd REPO
(Use the SSH URL GitHub gives you.)
Part 8 — Install dependencies and run the server
On the Ubuntu server, inside your repo:
make install PORT=41XX make dev
Example:
PORT=4107 make dev
Leave this running.
Part 9 — Verify the server in your browser
On your laptop, open:
http://10.192.145.179:41XX
Example:
http://10.192.145.179:4107
You should see the Ghost page.
Part 10 — Required edit: personalize the page
Using VS Code Remote-SSH, open:
public/index.html
Find:
<h1 class="mb-2">Ghost</h1>
Change it to:
<h1 class="mb-2">Ghost - YourLastName</h1>
Save the file, reload the page in your browser, and confirm the change appears.
Common Problems (and fixes)
Page doesn’t load
- Use http, not https
- Verify your port is
41XX - Make sure
make devis still running
“Permission denied (publickey)” with GitHub
On the server:
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa ssh -T git@github.com
Git asks for username/password
You cloned with HTTPS. Fix it:
git remote set-url origin git@github.com:ORG/REPO.git
Port already in use
You started the server twice.
ss -ltnp | grep 41
Stop the old one (Ctrl+C).
VS Code Remote-SSH hangs
Test plain SSH first:
ssh yourUsername@10.192.145.179
If that fails, Remote-SSH will not work.
Final Checklist
- Logged into Ubuntu using student ID
- Generated 4096-bit RSA key on the server
- Added the key to GitHub
ssh -T git@github.comsucceeds- Accepted Classroom assignment
- Repo cloned on the server
PORT=41XX make devruns- Page loads at
10.192.145.179:41XX - Header shows Ghost – YourLastName
- VS Code edits files remotely on the server
