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

Author Message
zybroxz
[View user's profile]

Joined: 2009-12-17
Posts: 3
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 Sad )

Thanks in advance
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Please read FAQ. If that does not help, come back.
_________________
Martin Prikryl
zybroxz
[View user's profile]

Joined: 2009-12-17
Posts: 3
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
zybroxz
[View user's profile]

Joined: 2009-12-17
Posts: 3
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
JimGriffith
[View user's profile]

Joined: 2009-02-19
Posts: 21
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?
JimGriffith
[View user's profile]

Joined: 2009-02-19
Posts: 21
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.
Raghav

Guest


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.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License