nerdexam
CompTIA

XK0-005 · 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. To directly connect to a remote email server on the standard SMTP port, netcat is the appropriate command-line utility.

Troubleshooting

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

(28 responses)
  • B
    93% (26)
  • C
    4% (1)
  • D
    4% (1)

Why each option

To directly connect to a remote email server on the standard SMTP port, `netcat` is the appropriate command-line utility.

Atraceroute mail.foo.com 25

`traceroute` is used to map the network path and measure delays to a destination, not to establish an application-layer connection to a service.

Bnetcat mail.foo.com 25Correct

`netcat mail.foo.com 25` attempts to establish a TCP connection to the specified host `mail.foo.com` on port 25, which is the standard port for SMTP (Simple Mail Transfer Protocol). This command allows direct interaction with the SMTP service for testing connectivity.

Ctraceroute mail.foo.com 110

`traceroute` is incorrect for establishing a connection, and port 110 is used for POP3 (Post Office Protocol 3) for receiving mail, not SMTP for sending mail.

Dnetcat mail.foo.com 110

While `netcat` is the correct tool for connecting, port 110 is for POP3 (Post Office Protocol version 3), which is used for retrieving emails, not for connecting to an SMTP server.

Concept tested: Network connectivity testing with netcat

Source: https://manpages.debian.org/stable/netcat-traditional/netcat.1.en.html

Topics

#Netcat#Network connectivity#SMTP#Port numbers

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice