Stage 8 · Lesson 4 of 9
Your first server, set up safely
A (virtual private server) is a small rented Linux machine from a . One of these, or a , is the best place to practise. Do these first steps on a new server.
Log in and update the packages. Create a normal user that can use sudo. Set up key-based login for that user.
Turn off password login and root login over SSH. Then switch on a such as ufw that only lets in SSH and the ports you need. Also set a and delete servers you no longer use, because forgotten ones cost money.
Servers on the internet are scanned by attackers within minutes, so do all this before anything else.
Common traprunning everything as root with password login enabled.
A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it
Resources for this stage
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