Port 22

ssh · SCTP/TCP/UDP

RangeSystem/well-known port (0–1023)
ProtocolSCTP/TCP/UDP
Servicessh
ReferenceRFC 4251, RFC 9260
Modified2022-02-07

Frequently asked questions

What is port 22 used for?

Port 22 is registered with the IANA for ssh (SCTP/TCP/UDP). Description: The Secure Shell (SSH) Protocol; SSH.

Is port 22 a well-known port?

Yes. Port 22 is in the range 0–1023 (system or well-known ports). On Linux and macOS only privileged processes may bind to these ports.

How do I check whether port 22 is open?

Locally on Linux with ss -tulpn | grep ':22\b', on Windows with netstat -ano | findstr :22. To test a remote host use Test-NetConnection <host> -Port 22 in PowerShell or nc -zv <host> 22 on Linux/macOS.

How do I open port 22 in the firewall?

Ubuntu/Debian (ufw): sudo ufw allow 22/tcp. Fedora/RHEL (firewalld): sudo firewall-cmd --add-port=22/tcp --permanent, then firewall-cmd --reload. Windows (PowerShell as administrator): New-NetFirewallRule -DisplayName "Port 22" -Direction Inbound -Protocol TCP -LocalPort 22 -Action Allow.

IANA registry entries

ProtocolServiceDescription (IANA)
TCPsshThe Secure Shell (SSH) Protocol
UDPsshThe Secure Shell (SSH) Protocol
SCTPsshSSH

Nearby entries