PortGate

Resources · Port reference · port 2222

Port 2222 (alternate SSH): what it is and how to secure it

Moving SSH does not replace keys and a firewall allow.

Check command

ss -tulpn | grep 2222

Copied.

A scanner still finds 2222. Keep password authentication off only after a key works, and keep an allow rule for whichever port you use. Do not close 22 until the new port has already logged in.

ss -tulpn | grep 2222

A 0.0.0.0 or :: address is a public listener. 127.0.0.1 is local.