# What port does SSH use?

> SSH uses port 22. IANA assigns port 22 to the Secure Shell (SSH) Protocol, and RFC 4253 says an SSH server normally listens for TCP connections there.

*Port 22 is registered to SSH for TCP, UDP and SCTP, but the SSH standard says a server only normally listens there.*

- Type: Explainer
- Section: Tech
- By: Tech Desk
- Published: 2026-11-13T05:46:12-05:00
- Updated: 2026-11-13T05:46:12-05:00
- Checked: 2026-11-13T05:45:14-05:00
- URL: https://factsdesk.com/tech/what-port-does-ssh-use/

## Key facts

- SSH uses port 22: the IANA port number registry assigns port 22 over TCP to ssh, described as The Secure Shell (SSH) Protocol, with RFC 4251 as its reference. Source: [Internet Assigned Numbers Authority (IANA)](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ssh). Confirmed 2026-11-13T05:45:08-05:00. Cite: https://factsdesk.com/tech/what-port-does-ssh-use/#ssh-uses-port-22-the-iana-port-number-registry-assigns-port
- RFC 4253 says that when SSH is used over TCP/IP, the server normally listens for connections on port 22, a port officially assigned to SSH by IANA. Source: [RFC Editor (Internet Engineering Task Force)](https://www.rfc-editor.org/rfc/rfc4253.html). Confirmed 2026-11-13T05:45:14-05:00. Cite: https://factsdesk.com/tech/what-port-does-ssh-use/#rfc-4253-says-that-when-ssh-is-used-over-tcp-ip-the-server
- The IANA registry also lists ssh on port 22 for UDP and for SCTP, and the SCTP entry carries the reference RFC 9260. Source: [Internet Assigned Numbers Authority (IANA)](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ssh). Confirmed 2026-11-13T05:45:08-05:00. Cite: https://factsdesk.com/tech/what-port-does-ssh-use/#the-iana-registry-also-lists-ssh-on-port-22-for-udp-and-for
- Port 22 falls in the System Ports range of 0 to 1023, which IANA assigns only through IETF Review or IESG Approval. Source: [Internet Assigned Numbers Authority (IANA)](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ssh). Confirmed 2026-11-13T05:45:08-05:00. Cite: https://factsdesk.com/tech/what-port-does-ssh-use/#port-22-falls-in-the-system-ports-range-of-0-to-1023-which
- Protocols that run over SSH have their own registered ports, including NETCONF over SSH on port 830 and SNMP over SSH on port 5161. Source: [Internet Assigned Numbers Authority (IANA)](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ssh). Confirmed 2026-11-13T05:45:08-05:00. Cite: https://factsdesk.com/tech/what-port-does-ssh-use/#protocols-that-run-over-ssh-have-their-own-registered-ports

SSH uses port 22. The [IANA Service Name and Transport Protocol Port Number Registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ssh) assigns port 22 to the service name ssh, described as "The Secure Shell (SSH) Protocol", with RFC 4251 as the reference. The SSH transport standard, [RFC 4253, Section 4.1](https://www.rfc-editor.org/rfc/rfc4253.html#section-4.1), says that when SSH is used over TCP/IP, "the server normally listens for connections on port 22."

## Port 22 by transport protocol

The [IANA registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ssh) lists three entries for ssh on port 22, one for each transport protocol below.

| Transport | Port | Reference listed by IANA |
| --- | --- | --- |
| TCP | 22 | RFC 4251 |
| UDP | 22 | RFC 4251 |
| SCTP | 22 | RFC 9260 |

TCP is the transport the SSH standard describes for port 22: [RFC 4253](https://www.rfc-editor.org/rfc/rfc4253.html#section-4.1) describes port 22 in its section on use over TCP/IP, and [RFC 4251](https://www.rfc-editor.org/rfc/rfc4251.html#section-1) says the SSH transport layer "will typically be run over a TCP/IP connection, but might also be used on top of any other reliable data stream."

## What changed and when

[RFC 4253](https://www.rfc-editor.org/rfc/rfc4253.html), the Standards Track document for the SSH transport layer, was published in January 2006 and says port 22 "has been registered with the IANA, and has been officially assigned for SSH." The registry page as a whole shows a last update of 2026-11-10.

## Can SSH run on a port other than 22?

Yes. [RFC 4253](https://www.rfc-editor.org/rfc/rfc4253.html#section-4.1) says the server "normally" listens on port 22, and its [Section 4](https://www.rfc-editor.org/rfc/rfc4253.html#section-4) says SSH works over any 8-bit clean, binary-transparent transport and that the client initiates the connection.

The [IANA registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ssh) also warns that traffic on a registered port does not necessarily correspond to the assigned service, and that firewall and system administrators should configure their systems based on their knowledge of the traffic, not on whether a port number is registered.

## Where port 22 sits among port ranges

The [IANA registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ssh) divides port numbers into three ranges under RFC 6335, which puts port 22 among the System Ports.

| Range | Ports | How IANA assigns them |
| --- | --- | --- |
| System Ports | 0 to 1023 | IETF Review or IESG Approval |
| User Ports | 1024 to 49151 | IETF Review, IESG Approval or Expert Review |
| Dynamic or Private Ports | 49152 to 65535 | Not assigned |

## Other registered ports that involve SSH

Some protocols that run over SSH have registered ports of their own. These entries are from the [IANA registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ssh).

| Port | Service name | Listed by IANA as |
| --- | --- | --- |
| 830 | netconf-ssh | NETCONF over SSH (RFC 6242) |
| 4334 | netconf-ch-ssh | NETCONF Call Home (SSH) (RFC 8071) |
| 5161 | snmpssh | SNMP over SSH Transport Model (RFC 5592) |
| 5162 | snmpssh-trap | SNMP Notification over SSH Transport Model (RFC 5592) |

One name in the same search is easy to misread: port 614 is registered as sshell, which the [IANA registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ssh) describes as SSLshell, a separate service from SSH.

## What runs over port 22

[RFC 4251](https://www.rfc-editor.org/rfc/rfc4251.html#section-1) describes SSH as "a protocol for secure remote login and other secure network services over an insecure network." It has three parts: a transport layer protocol for server authentication, confidentiality and integrity; a user authentication protocol; and a connection protocol that multiplexes the encrypted tunnel into logical channels. The same section says the connection protocol provides standard methods for interactive shell sessions and for forwarding arbitrary TCP/IP ports and X11 connections, which travel inside the SSH connection rather than on ports of their own.

Once a TCP connection to port 22 is open, [RFC 4253, Section 4.2](https://www.rfc-editor.org/rfc/rfc4253.html#section-4.2) requires both sides to send an identification string that starts with `SSH-`, followed by the protocol version, which is "2.0" for the protocol the standard defines.

## Sources

1. [Service Name and Transport Protocol Port Number Registry (search: ssh)](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ssh), Internet Assigned Numbers Authority (IANA), 2026-11-10 (primary source)
2. [RFC 4253: The Secure Shell (SSH) Transport Layer Protocol](https://www.rfc-editor.org/rfc/rfc4253.html), RFC Editor (Internet Engineering Task Force), 2006-01 (primary source)
3. [RFC 4251: The Secure Shell (SSH) Protocol Architecture](https://www.rfc-editor.org/rfc/rfc4251.html), RFC Editor (Internet Engineering Task Force), 2006-01 (primary source)

## Asked next

- [What port does HTTP use?](https://factsdesk.com/tech/what-port-does-http-use/): HTTP uses TCP port 80 by default. RFC 9110 makes port 80 the default for http URLs, and IANA assigns port 80 to the http service.
- [What port does HTTPS use?](https://factsdesk.com/tech/what-port-does-https-use/): HTTPS uses TCP port 443 by default: under RFC 9110, an https address with no port named goes to port 443, the reserved port for HTTP over TLS.
- [Trump names Pentagon CIO Kirsten Davies to lead national cyber office](https://factsdesk.com/tech/who-is-the-new-national-cyber-director/): President Trump named Kirsten A. Davies, the Pentagon's chief information officer, on Nov. 19, 2026 to lead the national cyber director office.
- [CrowdStrike says a Windows content update caused its July 2024 outage](https://factsdesk.com/tech/what-caused-the-crowdstrike-outage/): CrowdStrike's root cause analysis says a content update for its Windows sensor, released July 19, 2024, caused the widespread outage.
- [AWS says a DNS race condition in DynamoDB caused the October 2025 outage](https://factsdesk.com/tech/what-caused-the-aws-outage-in-october-2025/): AWS says a latent race condition in its DynamoDB DNS system left the us-east-1 endpoint with an empty DNS record on Oct. 19, 2025.
- [Nvidia RTX Spark compact desktops from ASUS, Dell and MSI go on sale](https://factsdesk.com/tech/nvidia-rtx-spark/): Nvidia said RTX Spark compact desktops from ASUS, Dell and MSI became available on Nov. 18, 2026. Dell lists its model from $7,464 and ASUS at $4,499.
