Home Net Guide

Home / Port numbers / Port 22

Port 22: SSH

Secure remote login and file transfer (SFTP). Port 22 uses TCP.

Port
22
Commonly used for
SSH
Transport
TCP
Encrypted
Yes
Range
System (well-known) port, 0 to 1023
Our advice
Open it only if you need it, and secure the service first
IANA registration
ssh The Secure Shell (SSH) Protocol (TCP, UDP, SCTP)

Registration: IANA Service Name and Transport Protocol Port Number Registry, retrieved 15 November 2026. The registered name can differ from the everyday use, because popular software often adopts a port without registering it. The description and advice are written by Home Net Guide and describe common practice: any program can be set to use any port.

What port 22 is used for

Port 22 is SSH, the standard way to get an encrypted command line on a remote computer. The same connection carries SFTP and scp file transfers, Git over SSH, and tunnels that forward other ports securely. It is on by default on most Linux servers and many routers and NAS devices.

Should port 22 be open?

Any address with port 22 open receives password-guessing attempts all day from automated bots. SSH itself is sound, so the defence is configuration: sign in with keys rather than passwords, disable direct root login, and keep the software updated. Moving it to another port cuts the noise but is not security. At home, leave it closed and use a VPN to reach your network.

Related ports

  • Port 2222 (SSH alternate (unofficial)): SSH moved off its standard port, and the DirectAdmin panel
  • Port 23 (Telnet): remote command line, unencrypted
  • Port 3389 (RDP): Windows Remote Desktop
  • Port 21 (FTP): file transfer commands, unencrypted

See all port numbers for the full list and how ports, TCP and UDP work.

Previous: Port 21 (FTP) · Next: Port 23 (Telnet)