Bitzu

N10-009 ยท Ports, protocols and traffic types

Remote access and file transfer ports

FTP 20/21, SFTP and SSH 22, Telnet 23, TFTP 69, SMB 445, RDP 3389: what each does and secure vs insecure choices.

Key points

  • FTP uses 21 for control and 20 for data, and sends everything in cleartext.
  • SFTP is not FTP: it runs inside SSH on port 22 and is encrypted.
  • Telnet (23) is a cleartext remote shell.
  • TFTP (69, UDP) has no authentication and suits simple boot or config transfers.
  • SMB (445) is Windows file and printer sharing.
  • RDP (3389) gives a remote desktop.
  • Prefer SSH and SFTP over Telnet and FTP.

Source: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml

Practice questions

Single choice

Which TCP port does SSH, and therefore SFTP, use by default?

  1. 21
  2. 22
  3. 23
  4. 3389
Show answer

Answer: B. 22

SSH listens on 22, and SFTP is carried inside that SSH session. Port 21 is the FTP control channel and 23 is Telnet.

Select all that apply

Which of these protocols send their data without encryption?

  1. FTP control channel on 21
  2. SSH on 22
  3. Telnet on 23
  4. TFTP on 69
  5. SFTP on 22
Show answer

Answer: A. FTP control channel on 21, C. Telnet on 23, D. TFTP on 69

FTP, Telnet and TFTP all transmit in cleartext (TFTP also has no authentication). SSH and SFTP are encrypted.

True or false

SFTP is regular FTP with encryption added, so it still uses ports 20 and 21.

Show answer

Answer: False

SFTP is a separate protocol that runs as a subsystem of SSH, on port 22. FTP over TLS (FTPS) is the encrypted FTP variant.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More N10-009 topics in this module