CompTIA Linux+ (XK0-004) — Question 214
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?
Answer options
- A. traceroute mail.foo.com 25
- B. netcat mail.foo.com 25
- C. traceroute mail.foo.com 110
- D. netcat mail.foo.com 110
Correct answer: B
Explanation
The correct answer is B because netcat (nc) is a utility that allows for network connections to be established, making it suitable for connecting to the SMTP port (25) on the specified server. Options A and C use traceroute, which is used to trace the route packets take to a network host and does not establish a connection. Option D also uses netcat, but it targets the incorrect port (110), which is used for POP3, not SMTP.