[VB6] Connect By ID and PPK file
Hello :)
Thank you for for your precious time.
I have a SFTP Connection ID and .ppk File for SFTP Connect (exclude Password).
And I want to make VB6 code for Connect and Upload file by ID and .ppk file(ppk file path)
I find example about SFTP Connect and apply then, But It doesn't work.
Here's the VB code that I need help.
I am looking forward to your reply.
Sincerely.
Thank you for for your precious time.
I have a SFTP Connection ID and .ppk File for SFTP Connect (exclude Password).
And I want to make VB6 code for Connect and Upload file by ID and .ppk file(ppk file path)
I find example about SFTP Connect and apply then, But It doesn't work.
Here's the VB code that I need help.
' Connection Option
Dim session
Dim sessionOptions
Set session = New session
Set sessionOptions = CreateObject("WinSCP.SessionOptions")
Dim myTransferOptions As New TransferOptions
With sessionOptions
.Protocol = Protocol_Sftp
.HostName = "SFTP Address"
.UserName = "SFTP Connect ID"
.SshPrivateKeyPath = "Full Path of .ppk File"
End With
' Binary Mode
myTransferOptions.TransferMode = TransferMode_Binary
' Connect
session.DisableVersionCheck = True
session.Open (sessionOptions)I am looking forward to your reply.
Sincerely.