Menu
Linux · 10 Topic · 3 steps

Security

“Security administration, securing a host, and encryption with OpenSSH and GnuPG.”

Topic 110 is the last topic of LPIC-1 exam 102-500. It’s about keeping a Linux machine safe day to day: checking for risky files and open ports, controlling passwords and root access, turning off services you don’t use, and protecting data with encryption.

None of it needs special security software. Everything here uses standard tools from your distribution’s own packages, like find, ss, sudo, ssh and gpg.

You’ll learn:

  • How to audit SUID/SGID files, set password aging, limit users and see who logged in
  • How to find open ports and turn off services on systemd, SysV init and xinetd
  • How shadow passwords and TCP wrappers work
  • How to use SSH keys, the SSH agent, port forwarding and X11 tunnels
  • How to encrypt, decrypt, sign, verify and revoke with GnuPG

You’ll need: a Linux machine, a VM or a container such as docker run -it --rm debian or docker run -it --rm ubuntu (install tools like nmap, openssh-client and gnupg with apt install). Most auditing commands need root or sudo. A VM works better than a container for the service and login parts, since containers usually don’t run systemd or an SSH server.

Start reading →
Byte card for Security: Audit SUID/SGID files with find, and age passwords with chage and passwd. Find open ports with ss, netstat, lsof, fuser and nmap; switch off what you don't need. Hashes live in root-only /etc/shadow; /etc/nologin blocks every login but root's. sudo runs one command as root with your own password; edit /etc/sudoers only with visudo. SSH keys and tunnels, plus gpg to encrypt, sign, verify and revoke.

Byte card

The whole topic on one card

  1. Audit SUID/SGID files with find, and age passwords with chage and passwd.
  2. Find open ports with ss, netstat, lsof, fuser and nmap; switch off what you don't need.
  3. Hashes live in root-only /etc/shadow; /etc/nologin blocks every login but root's.
  4. sudo runs one command as root with your own password; edit /etc/sudoers only with visudo.
  5. SSH keys and tunnels, plus gpg to encrypt, sign, verify and revoke.

Save it as a cheat sheet, or share it with someone who's learning this too.

Search posts and bytes

Optional account

Keep your progress everywhere

Everything on AminBytes is free to read, with or without an account. Sign in only if you want your commits, streak and merged topics saved, on every device.

or

We keep only your name, avatar and which bytes you finished, and you can delete it all anytime. Privacy