Unleash Your Server Potential with Expert Insights
Hosting provided by: CloudwaysSponsored by: shopp.bio
Sponsored by: shopp.bio
Category: VPS Setup
/etc/ssh/sshd_config
withnano /etc/ssh/sshd_config
Port 2222
then restart SSH withsystemctl restart sshd
apt install fail2ban
/etc/fail2ban/jail local
:[sshd]\nenabled = true\nport = 2222\nfilter = sshd\nlogpath = /var/log/auth.log\nmaxretry = 5\nbantime = 3600
systemctl restart fail2ban
ufw allow 2222
ssh -p 2222 user@ip
fail2ban-client status sshd