Re: Host Key Does not Match Configured Key Error
The PuTTYgen does not give you the host key. That's your account private key.
See https://winscp.net/eng/docs/faq_hostkey
See https://winscp.net/eng/docs/faq_hostkey
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
Private Sub Upload(ByRef mySession As Session)
' Setup session options
Dim mySessionOptions As New SessionOptions
With mySessionOptions
.Protocol = Protocol_Sftp
.HostName = "My host name goes here"
.UserName = "Username goes here"
.Password = "password goes here"
.SshHostKeyFingerprint = "ssh-rsa 2048 93:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
End With
' Connect
mySession.Open mySessionOptions
' Upload files
Dim myTransferOptions As New TransferOptions
myTransferOptions.TransferMode = TransferMode_Binary
Dim transferResult As TransferOperationResult
Set transferResult = mySession.GetFiles("/reports/*", "F:\SFTP", False, myTransferOptions)
' Throw on any error
transferResult.Check
' Display results
Dim transfer As TransferEventArgs
For Each transfer In transferResult.Transfers
MsgBox "Upload of " & transfer.Filename & " succeeded"
Next
End Sub