π§© MODULE 1 β NETWORK FOUNDATION (WHY SSH WORKS)
πΉ Lecture Topics Covered
- TCP vs UDP
- Port scanning (Nmap)
- NAT & Port Forwarding
- Home vs Cloud networking
- Why SSH ports matter
π§ͺ LAB 1 β Understanding Ports & Services (Nmap)
π― Goal
Understand what ports are, why SSH uses ports, and how attackers find servers.
π§ Concept (Beginner Explanation)
A port is like a door on a server.
SSH uses port 22 by default.
Attackers scan the internet to find open doors.
π§ͺ Exercise
- Install nmap:
sudo apt install nmap -y
- Scan localhost:
nmap localhost
- Scan SSH explicitly:
nmap -p 22 localhost
- Run SYN scan (root required):
sudo nmap -sS localhost
π§ What You Learn
- What βopenβ, βclosedβ, βfilteredβ mean
- Why SSH port scanning is dangerous
- Why changing SSH port reduces noise
π§βπΌ DevOps Real-World Use
Before exposing a server, DevOps engineers scan their own infrastructure to ensure only expected ports are open.
π§ͺ LAB 2 β NAT & Port Forwarding (Mental Model)
π― Goal
Understand why SSH sometimes works locally but not from outside.
π§ Concept
- Home router = NAT
- Internal IP β Internet IP
- SSH from outside requires port forwarding
π§ͺ Exercise (Observation)
- Find local IP:
ip a
- Find gateway:
ip route
- Understand:
- Why cloud servers donβt need port forwarding
- Why home servers do
π§ What You Learn
- Why cloud networking feels βeasierβ
- Why DevOps prefers cloud infra
- Why NAT breaks inbound SSH
π§© MODULE 2 β SSH FUNDAMENTALS
πΉ Lecture Topics Covered
- What SSH is
- Client vs Server
- Use cases
- VM networking models
π§ͺ LAB 3 β Install & Start SSH Server
π― Goal
Turn a machine into a real server.
π§ Concept
SSH server = remote control service
π§ͺ Exercise
Ubuntu:
sudo apt update
sudo apt install openssh-server -y
sudo systemctl status ssh
CentOS:
sudo dnf install openssh-server -y
sudo systemctl enable sshd --now
π§ What You Learn
- Difference between client & server
- How servers accept connections
- How system services work
π§βπΌ DevOps Reality
Every cloud VM you manage relies on SSH.
π§ͺ LAB 4 β SSH Connection Basics
π― Goal
Log into a server remotely.
π§ͺ Exercise
ssh user@server-ip
Test:
whoami
hostname
pwd
π§ What You Learn
- You are controlling a remote machine
- Commands run on the server, not locally
π§© MODULE 3 β SSH SECURITY HARDENING (CORE DEVOPS SKILL)
πΉ Lecture Topics Covered
- Change SSH port
- Disable root login
- Whitelist users
- Logs & monitoring
π§ͺ LAB 5 β Change SSH Port (22 β 2222)
π― Goal
Reduce attack surface.
π§ͺ Exercise
sudo nano /etc/ssh/sshd_config
Change:
Port 2222
Test:
sudo sshd -t
sudo systemctl restart sshd
Connect:
ssh -p 2222 user@server
π§ What You Learn
- How SSH configuration works
- Why services must be restarted
- How easy it is to break access
π§βπΌ DevOps Reality
Every production SSH server does this.
π§ͺ LAB 6 β Disable Root Login
π― Goal
Prevent instant full compromise.
π§ͺ Exercise
PermitRootLogin no
Restart SSH.
Test:
ssh root@server
π§ What You Learn
- Principle of least privilege
- Why attackers target root
π§ͺ LAB 7 β AllowUsers Whitelisting
π― Goal
Explicitly control access.
π§ͺ Exercise
AllowUsers devuser
Test login failure for others.
π§ What You Learn
- SSH as access control layer
- How DevOps enforces policy
π§© MODULE 4 β DO NOT LOCK YOURSELF OUT
πΉ Lecture Topics Covered
- Multiple SSH sessions
- Safe changes
- Recovery mindset
π§ͺ LAB 8 β Two-Session Safety Practice
π― Goal
Never brick a production server.
π§ͺ Exercise
- Open two SSH terminals
- Stop SSH:
sudo systemctl stop sshd
- Observe:
- Session A works
- Session B fails
- Restore:
sudo systemctl start sshd
π§ What You Learn
- Why existing connections survive
- How DevOps recovers mistakes
π§© MODULE 5 β SSH KEYS (ENTERPRISE AUTH)
πΉ Lecture Topics Covered
- Public/private keys
- ssh-keygen
- ssh-copy-id
- authorized_keys
π§ͺ LAB 9 β SSH Key Authentication
π― Goal
Replace passwords with cryptography.
π§ͺ Exercise
ssh-keygen -t rsa -b 4096
ssh-copy-id -p 2222 user@server
ssh -p 2222 user@server
π§ What You Learn
- Cryptographic trust
- Why keys are stronger than passwords
- Foundation for automation
π§© MODULE 6 β DISABLE PASSWORD LOGIN
πΉ Lecture Topics Covered
- PasswordAuthentication no
- sudo separation
- Recovery planning
π§ͺ LAB 10 β Enforce Key-Only SSH
π― Goal
Eliminate brute-force attacks.
π§ͺ Exercise
PasswordAuthentication no
Restart SSH.
Test:
ssh user@server
From another user β should fail.
π§ What You Learn
- Zero-trust login
- Production hardening standard
π§© MODULE 7 β KEEP SSH ALIVE
πΉ Lecture Topics Covered
- SSH keepalive
- Client config
- Long-running sessions
π§ͺ LAB 11 β Prevent Connection Drops
π― Goal
Survive long deployments.
π§ͺ Exercise
nano ~/.ssh/config
Host *
ServerAliveInterval 60
ServerAliveCountMax 3
π§ What You Learn
- Client vs server responsibility
- Why SSH drops connections
π§© MODULE 8 β FINGERPRINTS & MITM PROTECTION
πΉ Lecture Topics Covered
- Fingerprints
- known_hosts
- MITM attacks
π§ͺ LAB 12 β Fingerprint Verification
π― Goal
Detect impostor servers.
π§ͺ Exercise
Client:
cat ~/.ssh/known_hosts
Server:
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub
Compare hashes.
π§ What You Learn
- Why fingerprints exist
- How SSH prevents MITM
π§© MODULE 9 β FILE TRANSFER (SFTP / SCP)
πΉ Lecture Topics Covered
- SCP
- SFTP
- GUI tools (Cyberduck)
π§ͺ LAB 13 β SCP & SFTP
π― Goal
Move data securely.
scp -P 2222 file.txt user@server:/home/user/
scp -P 2222 user@server:/home/user/file.txt .
GUI:
- Connect via SFTP
- Drag & drop files
π§ What You Learn
- Why FTP is insecure
- Secure automation transfers
π§© MODULE 10 β SCREEN (PRODUCTION SURVIVAL TOOL)
πΉ Lecture Topics Covered
- screen
- detach/attach
- collaboration
π§ͺ LAB 14 β Screen Mastery
π― Goal
Survive disconnects & collaborate.
screen
Ctrl+A Ctrl+D
screen -x
exit
π§ What You Learn
- Persistent sessions
- Remote teamwork
π FINAL CAPSTONE PROJECT
π― Scenario
You are the only DevOps engineer managing a production server.
You must:
- Harden SSH
- Use key auth only
- Prevent lockout
- Enable file transfer
- Keep sessions alive
- Share terminal with teammate
π OUTCOME
After completing this:
- Student can manage real servers
- Student understands SSH deeply
- Student thinks like a DevOps engineer
- Student can pass interviews
If you want, next I can:
- Convert this into PDF course manual
- Create graded homework
- Add interview questions
- Add cloud (AWS EC2) version
- Add GitHub lab repo
Just tell me what you want next.
Audience: Absolute beginners
Outcome: Production-ready DevOps engineer mindset
Environment: Ubuntu / CentOS / Cloud / VM
Style: Real-world, mistakes included, recovery included
π§© MODULE 1 β NETWORK FOUNDATION (WHY SSH WORKS)
πΉ Lecture Topics Covered
- TCP vs UDP
- Port scanning (Nmap)
- NAT & Port Forwarding
- Home vs Cloud networking
- Why SSH ports matter
π§ͺ LAB 1 β Understanding Ports & Services (Nmap)
π― Goal
Understand what ports are, why SSH uses ports, and how attackers find servers.
π§ Concept (Beginner Explanation)
A port is like a door on a server.
SSH uses port 22 by default.
Attackers scan the internet to find open doors.
π§ͺ Exercise
- Install nmap:
sudo apt install nmap -y
- Scan localhost:
nmap localhost
- Scan SSH explicitly:
nmap -p 22 localhost
- Run SYN scan (root required):
sudo nmap -sS localhost
π§ What You Learn
- What βopenβ, βclosedβ, βfilteredβ mean
- Why SSH port scanning is dangerous
- Why changing SSH port reduces noise
π§βπΌ DevOps Real-World Use
Before exposing a server, DevOps engineers scan their own infrastructure to ensure only expected ports are open.
π§ͺ LAB 2 β NAT & Port Forwarding (Mental Model)
π― Goal
Understand why SSH sometimes works locally but not from outside.
π§ Concept
- Home router = NAT
- Internal IP β Internet IP
- SSH from outside requires port forwarding
π§ͺ Exercise (Observation)
- Find local IP:
ip a
- Find gateway:
ip route
- Understand:
- Why cloud servers donβt need port forwarding
- Why home servers do
π§ What You Learn
- Why cloud networking feels βeasierβ
- Why DevOps prefers cloud infra
- Why NAT breaks inbound SSH
π§© MODULE 2 β SSH FUNDAMENTALS
πΉ Lecture Topics Covered
- What SSH is
- Client vs Server
- Use cases
- VM networking models
π§ͺ LAB 3 β Install & Start SSH Server
π― Goal
Turn a machine into a real server.
π§ Concept
SSH server = remote control service
π§ͺ Exercise
Ubuntu:
sudo apt update
sudo apt install openssh-server -y
sudo systemctl status ssh
CentOS:
sudo dnf install openssh-server -y
sudo systemctl enable sshd --now
π§ What You Learn
- Difference between client & server
- How servers accept connections
- How system services work
π§βπΌ DevOps Reality
Every cloud VM you manage relies on SSH.
π§ͺ LAB 4 β SSH Connection Basics
π― Goal
Log into a server remotely.
π§ͺ Exercise
ssh user@server-ip
Test:
whoami
hostname
pwd
π§ What You Learn
- You are controlling a remote machine
- Commands run on the server, not locally
π§© MODULE 3 β SSH SECURITY HARDENING (CORE DEVOPS SKILL)
πΉ Lecture Topics Covered
- Change SSH port
- Disable root login
- Whitelist users
- Logs & monitoring
π§ͺ LAB 5 β Change SSH Port (22 β 2222)
π― Goal
Reduce attack surface.
π§ͺ Exercise
sudo nano /etc/ssh/sshd_config
Change:
Port 2222
Test:
sudo sshd -t
sudo systemctl restart sshd
Connect:
ssh -p 2222 user@server
π§ What You Learn
- How SSH configuration works
- Why services must be restarted
- How easy it is to break access
π§βπΌ DevOps Reality
Every production SSH server does this.
π§ͺ LAB 6 β Disable Root Login
π― Goal
Prevent instant full compromise.
π§ͺ Exercise
PermitRootLogin no
Restart SSH.
Test:
ssh root@server
π§ What You Learn
- Principle of least privilege
- Why attackers target root
π§ͺ LAB 7 β AllowUsers Whitelisting
π― Goal
Explicitly control access.
π§ͺ Exercise
AllowUsers devuser
Test login failure for others.
π§ What You Learn
- SSH as access control layer
- How DevOps enforces policy
π§© MODULE 4 β DO NOT LOCK YOURSELF OUT
πΉ Lecture Topics Covered
- Multiple SSH sessions
- Safe changes
- Recovery mindset
π§ͺ LAB 8 β Two-Session Safety Practice
π― Goal
Never brick a production server.
π§ͺ Exercise
- Open two SSH terminals
- Stop SSH:
sudo systemctl stop sshd
- Observe:
- Session A works
- Session B fails
- Restore:
sudo systemctl start sshd
π§ What You Learn
- Why existing connections survive
- How DevOps recovers mistakes
π§© MODULE 5 β SSH KEYS (ENTERPRISE AUTH)
πΉ Lecture Topics Covered
- Public/private keys
- ssh-keygen
- ssh-copy-id
- authorized_keys
π§ͺ LAB 9 β SSH Key Authentication
π― Goal
Replace passwords with cryptography.
π§ͺ Exercise
ssh-keygen -t rsa -b 4096
ssh-copy-id -p 2222 user@server
ssh -p 2222 user@server
π§ What You Learn
- Cryptographic trust
- Why keys are stronger than passwords
- Foundation for automation
π§© MODULE 6 β DISABLE PASSWORD LOGIN
πΉ Lecture Topics Covered
- PasswordAuthentication no
- sudo separation
- Recovery planning
π§ͺ LAB 10 β Enforce Key-Only SSH
π― Goal
Eliminate brute-force attacks.
π§ͺ Exercise
PasswordAuthentication no
Restart SSH.
Test:
ssh user@server
From another user β should fail.
π§ What You Learn
- Zero-trust login
- Production hardening standard
π§© MODULE 7 β KEEP SSH ALIVE
πΉ Lecture Topics Covered
- SSH keepalive
- Client config
- Long-running sessions
π§ͺ LAB 11 β Prevent Connection Drops
π― Goal
Survive long deployments.
π§ͺ Exercise
nano ~/.ssh/config
Host *
ServerAliveInterval 60
ServerAliveCountMax 3
π§ What You Learn
- Client vs server responsibility
- Why SSH drops connections
π§© MODULE 8 β FINGERPRINTS & MITM PROTECTION
πΉ Lecture Topics Covered
- Fingerprints
- known_hosts
- MITM attacks
π§ͺ LAB 12 β Fingerprint Verification
π― Goal
Detect impostor servers.
π§ͺ Exercise
Client:
cat ~/.ssh/known_hosts
Server:
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub
Compare hashes.
π§ What You Learn
- Why fingerprints exist
- How SSH prevents MITM
π§© MODULE 9 β FILE TRANSFER (SFTP / SCP)
πΉ Lecture Topics Covered
- SCP
- SFTP
- GUI tools (Cyberduck)
π§ͺ LAB 13 β SCP & SFTP
π― Goal
Move data securely.
scp -P 2222 file.txt user@server:/home/user/
scp -P 2222 user@server:/home/user/file.txt .
GUI:
- Connect via SFTP
- Drag & drop files
π§ What You Learn
- Why FTP is insecure
- Secure automation transfers
π§© MODULE 10 β SCREEN (PRODUCTION SURVIVAL TOOL)
πΉ Lecture Topics Covered
- screen
- detach/attach
- collaboration
π§ͺ LAB 14 β Screen Mastery
π― Goal
Survive disconnects & collaborate.
screen
Ctrl+A Ctrl+D
screen -x
exit
π§ What You Learn
- Persistent sessions
- Remote teamwork
π FINAL CAPSTONE PROJECT
π― Scenario
You are the only DevOps engineer managing a production server.
You must:
- Harden SSH
- Use key auth only
- Prevent lockout
- Enable file transfer
- Keep sessions alive
- Share terminal with teammate
π OUTCOME
After completing this:
- Student can manage real servers
- Student understands SSH deeply
- Student thinks like a DevOps engineer
- Student can pass interviews
Top comments (0)