Port 22: SSH
Encrypted remote shell, file transfer (SFTP/SCP) and tunnelling.
- Port
- 22
- Protocol
- TCP
- Service
- SSH
- Exposure
- Expose only with access controls
What is port 22 used for?
Managing servers, routers and switches; Git over SSH.
Is it safe to expose port 22 to the internet?
Safe protocol, but constantly scanned. Use keys instead of passwords, disable root login, and limit the source addresses.
If port 22 seems closed or unreachable
- Check that the SSH service is running and listening on port 22, not only on 127.0.0.1.
- Check the firewall on the host itself (Windows Defender Firewall, iptables, nftables, ufw) for a rule that allows TCP 22.
- If the host is behind a router, confirm the forwarding rule points to the correct internal address and that your internet provider does not use carrier-grade NAT.
- Test from outside your own network. A port can be open locally and blocked at the edge, or the other way round.
Using port 22 safely
Port 22 can be exposed when the host exists to provide this service, but add controls: restrict source addresses where you can, require strong authentication and encryption, and monitor the logs for repeated failures.
Check whether port 22 is open on your host
The check connects from our server, so it shows what the internet can reach.
Open the port checker