Topic "WinSCP.sessionoptions vbs with rawsettings"

Author Message
postkasse
[View user's profile]

Joined: 2016-04-14
Posts: 1
Hello,
Im using the following code to connect to SFTP with vbscript:
Code:

Dim sessionOptions
Set sessionOptions = WScript.CreateObject("WinSCP.SessionOptions")
With sessionOptions
    .Protocol = Protocol_Sftp
    .HostName = "ip"
    .UserName = "user"
    .SshHostKeyFingerprint = "ssh-rsa 2048 id"
    .sshprivatekeypath = "path"
    .sshprivatekeypassphrase= "pw"
End With

 
Dim session
Set session = WScript.CreateObject("WinSCP.Session")
 

session.Open sessionOptions


However the server requires SFTPMaxVersion=3.
How can I use the connectionsetting "-rawsettings SFTPMaxVersion=3" in vbscript/session.open ?



Edit: Found out (by using the winscp beta scriptmaker - very nice!), for anyone interested:
Code:

With sessionOptions
    .AddRawSettings "SFTPMaxVersion", "3"
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