Connect to an SSH server listening on its standard TCP port.
The server port has not been changed.
Which destination port is used?
SSH uses TCP port 22 by default. An administrator may configure a different port in the server settings.
Detailed explanation
Incorrect. 21/tcp is FTP control.
Incorrect. 23/tcp is Telnet.
Correct. 22/tcp is SSH's standard port.
Incorrect. 25/tcp is SMTP.
Try it yourself
An example you can run in a temporary verification environment.
getent services ssh | sed -n '1p'Expected result
ssh 22/tcpを示すサービスデータベース行Key points
- SSH is 22/tcp
- Telnet is 23/tcp
- Configuration can change the port
Notes
- Environment: Linux NSS servicesデータベース / 外部通信なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Network prefix
The part of an IP address that identifies the network rather than a host.
Transport protocol
TCP and UDP provide different delivery, reliability, and connection semantics.
Service port
A numbered endpoint used to deliver traffic to a network service.