nerdexam
CompTIA

SY0-301 · Question #911

Which of the following ports and protocol types must be opened on a host with a host- based firewall to allow incoming SFTP connections?

The correct answer is D. 22/TCP. SFTP (SSH File Transfer Protocol) runs as a subsystem of SSH and uses TCP port 22 for all communications.

Security operations

Question

Which of the following ports and protocol types must be opened on a host with a host- based firewall to allow incoming SFTP connections?

Options

  • A21/UDP
  • B21/TCP
  • C22/UDP
  • D22/TCP

How the community answered

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

Why each option

SFTP (SSH File Transfer Protocol) runs as a subsystem of SSH and uses TCP port 22 for all communications.

A21/UDP

Port 21 belongs to traditional FTP (not SFTP), and UDP does not provide the reliable delivery required by SSH or any file transfer protocol.

B21/TCP

Port 21 is the FTP control port used by traditional unencrypted FTP; SFTP is an entirely different protocol that does not use port 21 under any configuration.

C22/UDP

While SSH uses port 22, it operates over TCP, not UDP; SSH requires TCP's guaranteed ordered delivery to function correctly and does not support UDP.

D22/TCPCorrect

SFTP is not a variant of FTP but rather a file transfer protocol built on top of the SSH-2 protocol, which operates exclusively on TCP port 22. TCP is required because SSH - and by extension SFTP - needs the reliable, ordered, connection-oriented delivery that TCP provides to ensure data integrity during file transfer. Opening TCP port 22 on a host-based firewall is sufficient to allow incoming SFTP sessions.

Concept tested: SFTP protocol port and transport layer identification

Source: https://datatracker.ietf.org/doc/html/rfc4253

Topics

#SFTP#port 22#firewall rules#protocol ports

Community Discussion

No community discussion yet for this question.

Full SY0-301 Practice