0:00–0:10
Recap
0:10–0:40
Lecture
0:40–1:50
Lab 1C Parts 1–2
1:50–2:00
Debrief
0:00 – 0:10 Recap · 10 min

Verify network and motivate SSH keys

0:10 – 0:40 Lecture · 30 min

Asymmetric cryptography, the SSH key auth handshake, and why keys beat passwords

Part 1 — Symmetric vs. asymmetric encryption (8 min)

Part 2 — The SSH key authentication handshake (12 min)

Part 3 — Key passphrases and agent forwarding (10 min)

Instructor note: The handshake walkthrough on the board (Part 2) is the most valuable part of this lecture. Don't rush it. Students who understand the handshake intuitively are much better at debugging key auth failures later — they know what to check and why each piece matters.
0:40 – 1:50 Lab 1C Parts 1–2 · 70 min

Generate SSH keys on Windows, install openssh-server on all VMs, distribute public keys via SCP

Part 1 — Generate SSH keys on Windows host (15 min)

Part 2 — Verify SSH access and install openssh-server (10 min)

Part 3 — Copy public key to all three servers (25 min)

Part 4 — Test key-based login and create Windows Terminal sessions (20 min)

Common mistake: Students often copy the private key (id_rsa) instead of the public key (id_rsa.pub). If a student's key auth fails and they've confirmed the permissions are correct, check the content of authorized_keys — it should start with ssh-rsa, not -----BEGIN OPENSSH PRIVATE KEY-----.
1:50 – 2:00 Debrief · 10 min

Verify key auth and preview Day 4

Learning outcomes — by end of Day 3, students can…

Explain asymmetric encryptionDescribe the relationship between public and private keys, and explain why the public key can be shared freely
Describe the SSH key handshakeWalk through the five-step authentication flow without referring to notes
Generate an SSH key pairUse ssh-keygen to produce a 4096-bit RSA key pair and identify the correct file to distribute
Deploy key authenticationCopy a public key to a server's authorized_keys file, set correct permissions, and verify passwordless login
Configure Windows Terminal sessionsCreate named SSH profiles for rapid server access

Common issues and fixes

IssueLikely causeFix
SSH still prompts for password after key copyPermissions wrong on ~/.ssh or authorized_keysOn the server: chmod 700 ~/.ssh and chmod 600 ~/.ssh/authorized_keys. Check ownership: ls -la ~/.ssh — both must be owned by student
authorized_keys exists but key auth failsPrivate key copied instead of public keyCheck file content: cat ~/.ssh/authorized_keys. Should start with ssh-rsa AAAA. If it starts with -----BEGIN, delete the file and copy the .pub file instead
SCP command fails with "No such file or directory"Windows path format incorrect, or .ssh directory doesn't exist on serverCreate ~/.ssh first via SSH: mkdir -p ~/.ssh. Use forward slashes in Windows SCP paths or quote the path
SSH asks to verify host fingerprint every timeKnown_hosts file not being written, or different IP used each timeNormal behaviour on first connection only. If it repeats, check that the Windows .ssh directory is writable by the Student user
← Day 2 Lab 1C Handout Day 4 →