Port 22: SSH / SFTP
Port 22 is used by SSH and SFTP over TCP. Port 22 is Secure Shell. It appears in the study tables for 200-301, 220-1201, N10-009, SY0-701.
What runs on port 22
Secure Shell (SSH) uses TCP at the application layer. Encrypted remote login and secure file copy, and the basis for SCP and SFTP. Traffic on this service is encrypted.
Secure File Transfer Protocol (SFTP) uses TCP at the application layer. File transfer tunneled over an encrypted SSH session. Traffic on this service is encrypted.
Port 22 is Secure Shell. It gives an encrypted remote command line, and it also carries SFTP and SCP file transfers and port forwarding, so one open port supports several jobs. Key-based sign-in is the usual hardening step.
Secure alternative and common mix-ups
SSH and SFTP is the encrypted option for data on port 20, FTP on port 21, Telnet on port 23, TFTP on port 69.
SFTP is not FTP over SSL. It is a separate protocol that borrows the SSH connection, which is why it shares port 22 and why blocking port 21 does nothing to stop it.
Check port 22 on your own network
To test a remote host from Windows, run Test-NetConnection with the host name and -Port 22. From Linux or macOS, run nc -vz host 22. To see what is listening on the machine itself, use ss -tulpn on Linux or netstat -ano on Windows and look for :22.
A refused connection usually means no service is listening, and a probe that hangs usually means a firewall dropped it. Check the service, then the host firewall, then the network firewall, in that order.
Exam objectives that include it
These are the objectives whose tables list port 22. The same row appears in the cheat sheet for each exam.
Related ports
Learn 22 together with these. They are its pair, its secure counterpart or a service that sits under the same objective.
Questions
Port 22 carries SSH and SFTP, which is encrypted. Open it only where the service is needed, and keep the certificates and software current.
Keep going with the ports quiz and the cheat sheets.
Free plan, no card.