Mark,

Sending 'quo pasv 1' or 'quo epsv 1' will never work in a million years.

"quo" is short for "quote".  What "quote" does is lets you send a string to the FTP server without being interpreted by the client. This means the server is switching to passive mode, but the client doesn't know about it.  So the client will be trying to use active mode while the server is using passive mode...

If you are truly on a VPN with all ports open, then there shouldn't be a problem like this -- unless your PC has a firewall running that is blocking the ports.

-SK


On 2/9/2024 2:05 PM, mlazarus wrote:
Hi Patrik,

- This is via a VPN and according to the network admin all the ports are open.

- I can connect to the FTP server and log in.

- After logging in I run:
ftp> quo pasv 1
227 Entering Passive Mode (10,15,7,203,83,239).

- Return message after a while (or it just hangs) is:
 Could not connect to port.

- I have tried EPSV as well, with the same results.

 -mark

On 2/9/2024 12:13 PM, Patrik Schindler wrote:
Hello Mark,

Am 09.02.2024 um 02:08 schrieb mlazarus<mlazarus@xxxxxxxxxxxx>:
Any idea what might be causing this?  Or how to debug it?  TIA.
As Marc pointed out, it's an active-passive issue.

Active mode FTP means, the client instructs the server to build a *new* (data) connection back to the client. This mostly fails because the client's IP address is behind a NAT gateway and not reachable from the internet.

Passive mode FTP means, the client instructs the server to open a *new* (data) port where the client connects to: Same direction as the initial control connection. This usually works.

If you want to automate things via command line ftp, you probably need a command line client on Windows supporting passive mode.

Another viable solution would be to use sftp or scp which uses the ssh protocol for transmission. The PuTTY installation package provides command line tools for automation purposes.

:wq! PoC


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.