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. 21/tcp is FTP control.
Incorrect. 23/tcp is Telnet.
Incorrect. 23/tcp is Telnet.
Correct. 22/tcp is SSH's standard port.
Correct. 22/tcp is SSH's standard port.
Incorrect. 25/tcp is SMTP.
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
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.