Chapter 17: Basic Linux Security Tips
In this chapter, you'll learn how to secure a Linux system by disabling root login, configuring SSH keys, setting up a firewall, managing sudo access, and keeping packages updated.
In Chapter 16 of the LFCA Certification Course, you finished Module 3 by learning how cloud billing works, how different pricing models affect costs, how to track spending, and the common mistakes that lead to unexpected cloud bills in production.
Now Module 4: Security Fundamentals begins, and after spending four chapters focused on cloud concepts, this module brings you back to the Linux command line.
The LFCA exam covers security across three chapters: basic Linux security in this chapter, data protection and system hardening in Chapter 18, and network security in Chapter 19.
Module 4: Security Fundamentals starts here, and this module returns to the command line after 4 chapters of cloud concepts, covering the security practices the LFCA exam tests across 3 chapters: foundational system security in this chapter, data protection and system hardening in Chapter 18, and network security in Chapter 19.
This chapter focuses on the security basics every Linux administrator should configure before putting a server online. You'll learn how to disable root SSH logins, configure SSH keys, manage firewall rules, control sudo access, keep systems patched, and restrict accounts that should not have shell access.

These topics build directly on earlier chapters covering user management (Chapter 5), package management (Chapter 7), and networking and troubleshooting (Chapter 12).
The Security Fundamentals section makes up 14% of the LFCA exam. Questions test both your command knowledge and your understanding of why these security practices matter. So learning the reasoning behind the commands is just as important as memorizing syntax.
All commands in this chapter were tested on Ubuntu 26.04 LTS, but they also work on most modern Linux distributions, including Debian, Fedora, Rocky Linux, and RHEL. Where commands differ between distributions, those differences are clearly explained.