Stage 8 of 8 · 9 lessons · ~3 weeks
SSH, servers and debugging
Log into remote machines with SSH keys, set up and secure a small Linux server, keep work running with tmux, and debug problems with logs and networking tools.
Start: Logging in with SSHLessons· one lesson for each topic, in this order
- 1Logging in with SSHLesson
- 2The SSH config fileLesson
- 3Copying files: scp and rsyncLesson
- 4Your first server, set up safelyLesson
- 5tmux: sessions that survive disconnectsLesson
- 6Services and logsLesson
- 7Talking HTTP with curlLesson
- 8Network checks: DNS, ping and portsLesson
- 9A method for debugging your environmentLesson
Do this
- Create a small VPS or free-tier instance and set a billing alert.
- Create a sudo user, copy your key with `ssh-copy-id`, then disable root and password login.
- Enable ufw allowing only SSH and the ports you need.
- Add the server to `~/.ssh/config` and deploy a folder with `rsync --dry-run`, then for real.
- Run a long job inside tmux, disconnect and reattach.
- Serve a simple site or API, check it with `curl -i`, and read its logs with journalctl.
- Find which process holds a port with `ss` or `lsof`.
- Write a one-page runbook and delete the server when you no longer need it.
Start with· follow one of these
- GuideFreeInitial Server Setup with Ubuntu (DigitalOcean)
DigitalOcean · Beginner
A clear, widely used checklist for a new user, sudo, SSH access and a firewall on Ubuntu
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
The command-line environment lecture covers SSH, tmux, job control and dotfiles
Practise
Keep handy
Also worth your time
- roadmap.sh: LinuxGo deeper
The server, networking and troubleshooting branches of the Linux map
Before moving on: A small Linux server you set up yourself: a sudo user with key-only SSH, root and password login disabled, a firewall, a simple site or API served and checked with curl, your cron script running on it, and a one-page runbook covering how to log in, read logs, restart the service and what to check when it fails.

A cheap server you can break and rebuild teaches you more than any course, as long as you set a billing alert first and delete it when you are done. Keep a runbook as you go. When something breaks, read the logs before you search the error; the answer is usually right there.