[VB6] Connect By ID and PPK file

Advertisement

mybaek
Joined:
Posts:
1
Location:
KOREA

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

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: [VB6] Connect By ID and PPK file

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

You can post new topics in this forum