Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: How to enforce sftp version in command line

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

Re: How to enforce sftp version in command line

martin 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 https://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
saity

Re: How to enforce sftp version in command line

martin 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 https://winscp.net/eng/docs/scriptcommand_open


Thanks a ton, Martin
martin

Re: How to enforce sftp version in command line

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 https://winscp.net/eng/docs/scriptcommand_open
saity

How to enforce sftp version in command line

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

Thanks! That corrected my problem.
PiperRod

How to set SFTP protocol version through the command line

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?