SSH, or Secure Shell, uses TCP port 22 to establish a secure command-line interface with remote devices such as servers, switches, and routers. It encrypts the session to prevent eavesdropping, which makes it favored over older protocols like Telnet.