Security
bash
Beginner
SSH Hardening Config
Minimal sshd_config changes to harden SSH: disable root login, password auth, and old ciphers.
bash
# Add to /etc/ssh/sshd_config
Port 2222
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
X11Forwarding no
MaxAuthTries 3
ClientAliveInterval 300
# Reload: systemctl reload sshd
Prerequisites
- OpenSSH server
Pro Tips
- → Test config with sshd -t before reloading.
- → Keep a backup session open while changing port.
Commercial Licensing
Acquire a production access token or template license for enterprise deployment.
Module Info
- Language
- bash
- Level
- Beginner
- Read time
- 3 min
- Published
- Feb 2025
- License
- Commercial License
Newsletter
New modules every week, directly to your inbox.
Similar Modules
TOTP Two-Factor Auth
Generate and verify time-based one-time passwords (TOTP) compatible with Google Authenticator.
python
·
Advanced
Express CSRF Protection with Double Submit
Implement double-submit CSRF protection in Express without server-side session storage.
javascript
·
Intermediate
ClamAV Malware Scanner Cron
Run ClamAV on upload directory and quarantine infected files automatically.
bash
·
Advanced