Command line switch for "Force IP Address for passive mode"

Advertisement

zybroxz
Joined:
Posts:
3

Command line switch for "Force IP Address for passive mode"

Morning All,

I am able to connect to my FTPS server using WinSCP 4.2.4 using FTPS ExplictTLS, however when I send commands I get an Illegal port command message, this is because I am not specifying "Force IP Address for passive mode connections" in my script. Could anyone let me know the switch for "Force IP address for passive mode connections".

I am currently using the following OPEN command

open ftps://user:password@myserver:2121 -explicittls -passive -certificate="xx:xx:xx:xx:xx:xx:xx:"

Hope someone can help, I have a third party who needs to connect (and the deadline is rapidly approaching :( )

Thanks in advance

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,426
Location:
Prague, Czechia

Re: Command line switch for "Force IP Address for passive mode"

Please read FAQ. If that does not help, come back.
_________________
Martin Prikryl

Reply with quote

zybroxz
Joined:
Posts:
3

OK - How do I specify what INI file to use

Martin,

Thanks for directing me to the FAQ, I have had a look and need a bit of direction if possible.

If I create an INI file and set

FtpPasvMode=3
FtpForcePasvIp=1
FTPS=3

I am now wanting to open the connection from the command line using

open ftps://user:password@myserver:2121 -explicittls -passive -certificate="xx:xx:xx:xx:xx:xx:xx:"


How do I specify what INI file to use.

Thanks in advance

Z

Reply with quote

zybroxz
Joined:
Posts:
3

Solution

I have found a solution to the problem.

I let the GUI generate a INI file with Passive FTPS and "Force IP Address for passive mode connections".

Then from the command line I call WinSCP like so;

> winscp /ini=PathToIniFile

Sorted !!

Thanks

Reply with quote

JimGriffith
Joined:
Posts:
21

Re: Solution

zybroxz wrote:

I have found a solution to the problem.

I let the GUI generate a INI file with Passive FTPS and "Force IP Address for passive mode connections".

Then from the command line I call WinSCP like so;

> winscp /ini=PathToIniFile

Sorted !!

Thanks

So did you end up saving a session then exporting the prefs to an ini then calling your session from the command line/script?

Reply with quote E-mail

JimGriffith
Joined:
Posts:
21

Re: Solution

zybroxz wrote:

I have found a solution to the problem.

I let the GUI generate a INI file with Passive FTPS and "Force IP Address for passive mode connections".

Then from the command line I call WinSCP like so;

> winscp /ini=PathToIniFile

Sorted !!

Thanks

I was able to do this a different way. I went into the registry and added the DWORD values of FtpForcePasvIp and FtpPasvMode both with values of one to the

HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Sessions\Default%20Settings\ key.

The only downside is that anything sent via the FTP protocol (encrypted or not) is affected and will now be sent in Passive mode. This does NOT affect transmissions with SFTP protocol.

Reply with quote E-mail

Raghav
Guest

Re: Solution

JimGriffith wrote:

zybroxz wrote:

I have found a solution to the problem.

I let the GUI generate a INI file with Passive FTPS and "Force IP Address for passive mode connections".

Then from the command line I call WinSCP like so;

> winscp /ini=PathToIniFile

Sorted !!

Thanks

I was able to do this a different way. I went into the registry and added the DWORD values of FtpForcePasvIp and FtpPasvMode both with values of one to the

HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Sessions\Default%20Settings\ key.

The only downside is that anything sent via the FTP protocol (encrypted or not) is affected and will now be sent in Passive mode. This does NOT affect transmissions with SFTP protocol.

Instead of Default%20Settings you could set it for a specific session.

Reply with quote

Advertisement

You can post new topics in this forum