Post a reply :: Support Forum

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Username
Subject
Message body
Options

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.


(max 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)
Options
 

Topic review

Author Message
JeanG
Post
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 Smile
martin
Post
Show us a log file from FileZilla.

What does it mean "I can connect with ... WinSCP, but not with a SFTP client"?
JeanG
Post
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
With sessionOptions
.Protocol = Protocol.Sftp
.HostName = "xxx"
.UserName = "xxx"
.Password = "xxx"
.SshHostKeyFingerprint = "xxx"
.SshPrivateKeyPath = "C:\xxx\PrivateKey.ppk"
.AddRawSettings("AuthKI", "0")
End With

Using session As New Session
session.SessionLogPath = "C:\xxx\logwinscp.txt"
' Connect
session.Open(sessionOptions)
End Using
martin
No the "-" should not be a problem.
Are you able to connect with any other SSH or SFTP client using this private key?
JeanG
Hello.
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)
Authentication failed!
WinSCP.SessionRemoteException: Unexpected log out. Result of the exit command on the server 0
Authentication log:
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 Smile

Search

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License