Sorry if I wasn't very clear.
I could connect with FileZilla and a SFTP Client Like WinSCP software, but I could't do it with my code.
I took the one generated by WinSCP software.
I found my mistake finally, in this code I didn't need the password but the PrivateKeyPassphrase. I mingled theses 2.
Thanks for help :)
Show us a log file from FileZilla.
What does it mean "I can connect with ... WinSCP, but not with a SFTP client"?
I can connect with FileZilla and WinSCP, but not with a SFTP client.
Here is a part the VB code of my client:
Dim sessionOptions As New SessionOptions
.Protocol = Protocol.Sftp
.HostName = "xxx"
.UserName = "xxx"
.Password = "xxx"
.SshHostKeyFingerprint = "xxx"
.SshPrivateKeyPath = "C:\xxx\PrivateKey.ppk"
Using session As New Session
session.SessionLogPath = "C:\xxx\logwinscp.txt"
No the "-" should not be a problem.
Are you able to connect with any other SSH or SFTP client using this private key?
I have troubles when I try to connect with SFTP Protocol.
My computer is running on Windows 10.
Here's the message I get (translated from French)
WinSCP.SessionRemoteException: Unexpected log out. Result of the exit command on the server 0
Using user name: "xxx"
Authentication with public key "xxx"
And this is what I have in the end of the log file:
. 2016-06-23 14:19:50.374 Reading key file "xxx"
! 2016-06-23 14:19:50.375 Using username "xxx".
. 2016-06-23 14:19:50.452 Offered public key
. 2016-06-23 14:19:50.530 Offer of public key accepted
! 2016-06-23 14:19:50.530 Authenticating with public key "xxx"
. 2016-06-23 14:19:50.530 Prompt (passphrase, "SSH key passphrase", <no instructions>, "Passphrase for key "xxx": ")
. 2016-06-23 14:19:50.530 Disconnected: Unable to authenticate
I have a "-" in the password, could it be the cause of the error?
Thanks for your help :)