Concepts / Network services

Network services

FTP

Also called file transfer protocol, active mode, passive mode, PASV, PORT, EPSV, data channel, control channel

File transfer over two kinds of connection: commands on port 21, and a separate data connection per transfer.

The control channel (TCP 21) carries commands (USER, PASS, RETR, STOR, LIST) and three-digit replies. Each file or listing travels on its own data connection. In active mode (PORT) the client names its address and port and the server connects back, from port 20; in passive mode (PASV, EPSV) the server names a port and the client connects. Behind NAT only passive works, unless the router runs an FTP helper that rewrites PORT. Plain FTP sends the password and the files in the clear.

See it on real machines

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab