← Back to all network ports
TCP
Safe

22 SSH / SFTP

SSH secures interactive shell access, tunneling, and SFTP transfers for servers and infrastructure tooling.

Security Context

Port 22 is commonly expected on managed infrastructure, but it still needs scoped exposure, TLS where applicable, and service-specific hardening.

Nmap Check

Use a version probe first so you confirm whether the expected service is really what is listening on this port.

nmap -sV -p 22 <host>

Firewall Commands

UFW
sudo ufw allow 22/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT

Related TCP Ports