当前位置:网站首页>[FTP] the solution to "227 entering passive mode" during FTP connection

[FTP] the solution to "227 entering passive mode" during FTP connection

2022-07-01 04:43:00 Jiangtaixiaobai

FTP Appears when connecting “227 Entering Passive Mode” The solution is simple , Just close the client's PASV The way , Force its use PORT To access the server .

FTP Two working modes of service

•port The way ( Active mode ), Connection process : Client to server FTP port ( The default is 21) Send a connection request , Server accepts connection , Set up a command link . When data needs to be transmitted , The client uses... On the command link PORT The command tells the server :“ I opened it. ***X port , You come to connect me ”. So the server from 20 Port to client ***X Port send connection request , Establish a data link to transmit data .

•pasv The way ( Passive mode ), Connection process : Client to server FTP port ( The default is 21) Send a connection request , Server accepts connection , Set up a command link . When data needs to be transmitted , Server on command link PASV The command tells the client :“ I opened it. ***X port , You come to connect me ”. So client to server ***X Port send connection request , Build a data link To transmit data over the Internet .

Because of FTP Conduct TCP/IP Screening , Only specific ports are allowed to be connected by clients , So it can't be used PASV The way . Found the reason , The solution is simple , Just close the client's PASV The way , Force its use PORT To access the server .

Client login FTP After the server , use passive Command to close the client's PASV The way , as follows :

ftp> passive
Passive mode off.

Execute this command again to enable PASV Pattern .

原网站

版权声明
本文为[Jiangtaixiaobai]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/182/202207010439503701.html