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.
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)- B4% (1)
- C4% (1)
- D93% (26)
Why each option
SFTP (SSH File Transfer Protocol) runs as a subsystem of SSH and uses TCP port 22 for all communications.
Port 21 belongs to traditional FTP (not SFTP), and UDP does not provide the reliable delivery required by SSH or any file transfer protocol.
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.
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.
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
Community Discussion
No community discussion yet for this question.