Check well-known ports for three common services.
Which set is correct?
SSH is TCP 22, HTTP is TCP 80, and HTTPS is TCP 443.
Detailed explanation
SSH 23 / HTTP 443 / HTTPS 80Incorrect. 23 is Telnet and HTTP/HTTPS are swapped.
Incorrect. 23 is Telnet and HTTP/HTTPS are swapped.
SSH 22 / HTTP 80 / HTTPS 443Correct. The three standard port mappings are shown.
Correct. The three standard port mappings are shown.
SSH 25 / HTTP 110 / HTTPS 143Incorrect. These are SMTP, POP3, and IMAP-related values.
Incorrect. These are SMTP, POP3, and IMAP-related values.
SSH 53 / HTTP 123 / HTTPS 161Incorrect. These are DNS, NTP, and SNMP-related values.
Incorrect. These are DNS, NTP, and SNMP-related values.
Try it yourself
An example you can run in a temporary verification environment.
python3 -c "import socket; print(socket.getservbyname('ssh','tcp'), socket.getservbyname('http','tcp'), socket.getservbyname('https','tcp'))"Expected result
22 80 443Key points
- SSH 22
- HTTP 80
- HTTPS 443
Notes
- Environment: Python 3 socket service database
- 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.