Topic "Public key not being offered intermittently using winscp .net"

Author Message
burghcoder
[View user's profile]

Joined: 2016-12-07
Posts: 5
I have a service that uses WinSCP.net to send files to a vendor. We use pulic key authentication to log into the remote server. Things seem to be sending fine, but every once in a while a session connection is able to open because the public key is not being offered.

All the files we send use the same sessionOptions. The only thing that changes is the filename.

I found this using session logging.

Good file:
Code:

. 2016-12-07 12:40:51.761 Host key matches configured key
. 2016-12-07 12:40:51.761 Host key fingerprint is:
. 2016-12-07 12:40:51.761 ssh-rsa 1024 xxxxxxxxxxx
. 2016-12-07 12:40:51.761 Initialised AES-256 SDCTR client->server encryption
. 2016-12-07 12:40:51.761 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2016-12-07 12:40:51.761 Initialised AES-256 SDCTR server->client encryption
. 2016-12-07 12:40:51.761 Initialised HMAC-SHA-256 server->client MAC algorithm
. 2016-12-07 12:40:51.902 Reading private key file "xxx.ppk"
! 2016-12-07 12:40:51.902 Using username "xxx-01".
. 2016-12-07 12:40:51.949 Offered public key
. 2016-12-07 12:40:52.012 Offer of public key accepted
! 2016-12-07 12:40:52.012 Authenticating with public key "rsa-key-xxxx"
. 2016-12-07 12:40:52.012 Prompt (passphrase, "SSH key passphrase", <no instructions>, "Passphrase for key "rsa-key-xxx": ")
. 2016-12-07 12:40:52.012 Using configured passphrase.
. 2016-12-07 12:40:52.261 Sent public key signature
. 2016-12-07 12:40:52.324 Access granted


Bad file in the same process:

Code:

. 2016-12-07 12:40:56.386 Host key matches configured key
. 2016-12-07 12:40:56.386 Host key fingerprint is:
. 2016-12-07 12:40:56.386 ssh-rsa 1024 xxxxxxx
. 2016-12-07 12:40:56.386 Initialised AES-256 SDCTR client->server encryption
. 2016-12-07 12:40:56.386 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2016-12-07 12:40:56.386 Initialised AES-256 SDCTR server->client encryption
. 2016-12-07 12:40:56.386 Initialised HMAC-SHA-256 server->client MAC algorithm
. 2016-12-07 12:40:56.527 Reading private key file "xxx.ppk"
! 2016-12-07 12:40:56.527 Using username "xxx-01".
. 2016-12-07 12:40:56.589 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2016-12-07 12:40:56.589 Disconnected: Unable to authenticate



I am currently using version 5.7.7. Before I submit a request to have the services recompiled against version 5.9.3, is this a bug that was fixed or is this something else that I have missed?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26109
Location: Prague, Czechia
I've never seen this problem before.

If you are willing to, I can provide you a debug build of WinSCP, which does extensive logging. It can help with tracing the problem down.
burghcoder
[View user's profile]

Joined: 2016-12-07
Posts: 5
It just started happening when we starting testing with a customers remote server. I can send thousands of files to our server without any issues.


I would open to using a debug version. Do you want me to update our code to use version 5.9.3 first? Reading the release notes, it looks like there are some changes to the classes.
burghcoder
[View user's profile]

Joined: 2016-12-07
Posts: 5
I updated the code to the new version of WinSCP (5.9.3) and we were still seeing the issue. I am thinking this is an issue with our customers remote server.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26109
Location: Prague, Czechia
Thanks for your report.
I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.
_________________
Martin Prikryl
Advertisements

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License