Topic "How to set SFTP protocol version through the command line"

Author Message
PiperRod
[View user's profile]

Joined: 2008-02-07
Posts: 6
Location: Baltimore, MD
I'm using WinSCP 4.0.6 Build 358.

I'm trying to connect to a new vendor. I was receiving the errors

Cannot initialize SFTP protocol. Is the host running a SFTP server?
(Exception) Error decoding SFTP packet (111, 4, 111).

I have been able to get around this and connect to them using the Windows interface by setting the Preferred SFTP Protocol Version to 4 for this particular vendor. Now I'm working on automating the upload to them using WinSCP through the command line and I'm back to getting the same error. How can I set the Preferred SFTP Protocol Version through the command line?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Please read FAQ:
http://winscp.net/eng/docs/faq_script_ini
_________________
Martin Prikryl
PiperRod
[View user's profile]

Joined: 2008-02-07
Posts: 6
Location: Baltimore, MD
Thanks! That corrected my problem.
saity

Guest


PiperRod wrote:
Thanks! That corrected my problem.


I am facing the same issue, could you or martin help me here, only example will also be helpful. Thanks.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
saity wrote:
I am facing the same issue, could you or martin help me here, only example will also be helpful. Thanks.

With latest beta 5.0.5 you can do:
open username@hostname -rawsettings SFTPMaxVersion=3
See http://winscp.net/eng/docs/scriptcommand_open
_________________
Martin Prikryl
saity

Guest


prikryl wrote:
saity wrote:
I am facing the same issue, could you or martin help me here, only example will also be helpful. Thanks.

With latest beta 5.0.5 you can do:
open username@hostname -rawsettings SFTPMaxVersion=3
See http://winscp.net/eng/docs/scriptcommand_open


Thanks a ton, Martin
saity

Guest


prikryl wrote:
saity wrote:
I am facing the same issue, could you or martin help me here, only example will also be helpful. Thanks.

With latest beta 5.0.5 you can do:
open username@hostname -rawsettings SFTPMaxVersion=3
See http://winscp.net/eng/docs/scriptcommand_open


Martin,
5.0.5 is working fine with code you suggested in command prompt, but I am using it in SSIS and I am getting the error as below,

"In Executing "c:\Program Files\WinSCP\WinSCP.exe" "/script="E:\SSIS\test.txt"" at "", The process exit code was "1" while the expected was "0"."

test.txt contain the command lines, the same worked fine in older version.

I tried couple of options but unable to make it work. any suggestions, any kind of help be highly appreciable
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
saity wrote:
"In Executing "c:\Program Files\WinSCP\WinSCP.exe" "/script="E:\SSIS\test.txt"" at "", The process exit code was "1" while the expected was "0"."

Please post a full log file showing the problem.
_________________
Martin Prikryl
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