Linux SSH Hardening

Project 05 — Linux Security

Linux SSH Hardening — Ubuntu Server

A hands-on Linux security project focused on hardening SSH access on an Ubuntu machine, applying real-world best practices used in enterprise environments — from port changes and key-based authentication to UFW firewall rules.

SSH Hardening Overview SSH Configuration SSH Key Generation UFW Firewall Rules Port Configuration SSH Connection Test Final Verification

OS ► Ubuntu Linux

SSH Port ► Changed from 22 → 2200

Authentication ► RSA 4096-bit key-pair only (password auth disabled)

Firewall ► UFW — port 2200 allowed from trusted IP 192.168.41.1 only

Root Login ► Disabled (PermitRootLogin no)


What Was Implemented

Changed default SSH port from 22 to 2200 to reduce automated attack exposure. Disabled root login via SSH. Disabled password authentication and enforced RSA 4096-bit key-based authentication only. Generated a 4096-bit RSA key pair stored securely in /home/ssh_key_pairs. Configured UFW firewall to allow port 2200 from a trusted IP only. Created a backup of the original sshd_config before any changes.

Technologies ► Ubuntu Linux · OpenSSH · UFW Firewall · RSA Key Pair · Bash CLI


Key Takeaway

Demonstrates practical knowledge of Linux security hardening — a critical skill for any network or cloud engineer managing remote infrastructure. Every step follows real enterprise security policies.

← Back to projects