Topic "WINSCPNET Set Protocol Version"

Author Message
ggramajo
[View user's profile]

Joined: 2015-12-15
Posts: 2
Location: USA
Trying to access a host via SFTP I'm receiving the following error:

"Error: WinSCP.SessionRemoteException: No connection.\nError code: 6\nError message from server: [2015/12/15 17:40:55.977]
SSE2636 Command rejected due to sftp proxy policy settings: SSH_FXP_INIT ---> WinSCP.SessionRemoteException: Cannot initialize SFTP protocol. Is the host running a SFTP server?\r\n --- End of inner exception stack trace ---\r\n at WinSCP.SessionLogRe

Trying from the portable exe I was able to log to that host but after I change the setting of "Preferred SFTP Protocol Version" from 6 to 3.

Now the question is how can I set that setting from the c# call ?

Thanks in advance,

Gabe Gramajo.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Please read documentation:
https://winscp.net/eng/docs/rawsettings
ggramajo
[View user's profile]

Joined: 2015-12-15
Posts: 2
Location: USA
Thanks a lot I could resolve this using:

//According to https://winscp.net/eng/docs/rawsettings this is how you set up the Preferred SSH protocol version under .net assembly
//...0-5 = SFTP version number
sessionOptions.AddRawSettings("SFTPMaxVersion", "3");

Thanks again,

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