Another common alternate SSH port, used by some NAS and container setups.
Another common alternate SSH port, used by some NAS and container setups.
Expose only to trusted sources. Same hardening as port 22.
IANA lists port 2022 as unassigned. No service is registered for it.
sudo ss -tlnp 'sport = :2022'sudo lsof -nP -i :2022sudo netstat -tlnp | grep ':2022 'netstat -ano | findstr :2022Get-NetTCPConnection -LocalPort 2022 -State Listen | Select LocalAddress,OwningProcessnc -vz -w 5 HOST 2022Test-NetConnection HOST -Port 2022Replace 203.0.113.10 with the address or network you trust. With ufw, make sure the default incoming policy is deny.
sudo ufw allow from 203.0.113.10 to any port 2022 proto tcpsudo iptables -A INPUT -p tcp --dport 2022 -s 203.0.113.10 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 2022 -j DROPsudo nft add rule inet filter input ip saddr 203.0.113.10 tcp dport 2022 accept
sudo nft add rule inet filter input tcp dport 2022 dropNew-NetFirewallRule -DisplayName 'TCP 2022 trusted' -Direction Inbound -Protocol TCP -LocalPort 2022 -RemoteAddress 203.0.113.10 -Action AllowAll port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.