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

postkasse

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"