XK0-004 · Question #254
A Linux user needs to connect to a remote email server named mail.foo.com through the SMTP port. Which of the following commands will accomplish this task?
The correct answer is B. netcat mail.foo.com 25. Connecting to a remote server on a specific TCP port requires netcat, and SMTP uses port 25 - not traceroute, which traces routing paths rather than establishing TCP connections.
Question
A Linux user needs to connect to a remote email server named mail.foo.com through the SMTP port. Which of the following commands will accomplish this task?
Options
- Atraceroute mail.foo.com 25
- Bnetcat mail.foo.com 25
- Ctraceroute mail.foo.com 110
- Dnetcat mail.foo.com 110
How the community answered
(31 responses)- A3% (1)
- B94% (29)
- C3% (1)
Why each option
Connecting to a remote server on a specific TCP port requires netcat, and SMTP uses port 25 - not traceroute, which traces routing paths rather than establishing TCP connections.
traceroute maps the routing path to a destination; it does not establish a TCP connection to a service port and cannot be used to connect to SMTP.
netcat (nc) opens a raw TCP connection to a specified host and port, allowing direct communication with a service. SMTP operates on TCP port 25, so 'netcat mail.foo.com 25' establishes a connection to the mail server's SMTP listener, enabling the user to interact with it directly.
traceroute does not make TCP connections to application ports, and port 110 is POP3 for receiving mail, not the SMTP submission port.
netcat on port 110 connects to a POP3 service, not SMTP; SMTP uses port 25, not 110.
Concept tested: Connecting to TCP services with netcat and SMTP port
Source: https://linux.die.net/man/1/nc
Topics
Community Discussion
No community discussion yet for this question.