FTP modify master passive mode command

Time:2019-12-20

FTP has two data connection modes, active mode and passive mode.

Port (active): the client sends a connection request to the FTP port of the server (default is 21). The server accepts the connection and establishes a command link. When the data needs to be transmitted, the client uses the port command on the command link to tell the server: “I open port XXXX, you come to connect me.”. Then the server sends a connection request from port 20 to port XXXX of the client, and establishes a data link to transmit data.

The connection process of PASV (passive) mode is as follows:
The client sends a connection request to the FTP port of the server (21 by default). The server accepts the connection and establishes a command link. When the data needs to be transmitted, the server uses PASV command on the command link to tell the client: “I open port XXXX, you come to connect me.”. Then the client sends the connection request to the XXXX port of the server and establishes a data link to transmit the data.

The default mode of FTP is port active mode. If there is a firewall in the network where the client PC is located, the FTP server cannot connect to the client during data transmission.

 

resolvent:

Modification mode
Under Windows CMD, it is active mode by default. To change FTP to passive mode:

ftp> quote PASV

 

The Linux FTP command defaults to passive mode and changes to active mode:

ftp> passive