Identify classic active-mode FTP server ports for control and data connections.
Which pairing is appropriate?
Classic FTP uses TCP 21 for control and TCP 20 for the server-side active-mode data connection.
Detailed explanation
control TCP 20 / data TCP 21Incorrect. It reverses the control and data ports.
Incorrect. It reverses the control and data ports.
control UDP 21 / data UDP 20Incorrect. Classic FTP uses TCP, not UDP.
Incorrect. Classic FTP uses TCP, not UDP.
control TCP 21 / data TCP 20Correct. This is the classic active-mode mapping.
Correct. This is the classic active-mode mapping.
control TCP 22 / data TCP 23Incorrect. 22 and 23 are SSH and Telnet.
Incorrect. 22 and 23 are SSH and Telnet.
Try it yourself
An example you can run in a temporary verification environment.
python3 -c "import socket; print(socket.getservbyname('ftp','tcp'), socket.getservbyname('ftp-data','tcp'))"Expected result
21 20Key points
- Control 21
- Data 20
- Both TCP
Notes
- Environment: Python 3 socket service database
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.