how to do FTP Active mode?
Hello!
I need to connect to a remote FTP server and that server only accepts active mode ftp. I am using a production server of Red Hat Linux (not sure of the version) and it defaults to passive connection mode. How can I connect to ftp server using active connection mode? How it should be done? windows - defaults to active. linux - defaults to passive. the command i use: ftp <ip address> 21 ->then the remote ftp server asks for credentials. please note: Filezilla client have an option that accepts active mode. And that is possible because i noticed Filezilla uses raw ftp commands thru telnet - this is not a solution I am looking for though...the programs we have for automatic file transfers uses commercial FTP Java Library. I dont have control on the remote ftp server and the server that the automatic ftp program is hosted on... Your suggestion based on experience is greatly appreciated. -Ryan |
Hi,
The primary FTP server shipped with Red Hat Enterprise Linux is vsftpd. By default, vsftpd uses passive mode to transfer files. In /etc/vsftpd.conf, add the following entry: Code:
pasv_enable=NO This should work. |
The default active/passive mode that the connecting client will use can be enforced via the configs of the FTP server. You will need to consult the docs of your FTP server about how to do this.
java socket |
Hi,
If you can connect to FTP server through the auth part, then try the command 'PASV' to enable/disable Passive transfer. Active FTP vs. Passive FTP |
Thank you all for your advices! All of these are noted! :study: Based on your suggestions, The power on how the ftp client connecting (active or passive mode) to the ftp server relies on the ftp server itself..? hmm...I think I will call up the person who maintains the ftp server then to allow me to connect in ftp passive and all my problems are solved. I sure do hope that it;s okay with their policy though. I hoping they will allow it, if not I will just have to request SFTP instead.
I am thinking if there is a parameter or option i can use with the ftp command like: ftp -a <Ip> <port> (-a for active :)) so I will be able to connect in active mode. @lithios: I issued command PASV - server replied ?invalid command. (i am connected to remote server via putty) thanks for the link too. @annielover: Thanks for this...the server I am logging into is a red hat release. I think the remote server with FTP server is a Unix. |
The command to manually swith is: passive
Unfortunately you can't pass any config parameter to the ftp command to make it switch between active and passive mode. java socket |
All times are GMT -5. The time now is 09:44 PM. |