WinSCP.sessionoptions vbs with rawsettings

Advertisement

postkasse
Joined:
Posts:
1

WinSCP.sessionoptions vbs with rawsettings

Hello,
Im using the following code to connect to SFTP with vbscript:
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:
With sessionOptions
    .AddRawSettings "SFTPMaxVersion", "3"

Reply with quote

Advertisement

You can post new topics in this forum