Topic "[VB6] Connect By ID and PPK file"

Author Message
[View user's profile]

Joined: 2015-07-02
Posts: 1
Location: KOREA
Hello Smile
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.

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24736
Location: Prague, Czechia
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.

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License