EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Error code 10058 (Authentication type 4 failed, SSH error 114)

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#24537
Posted: 04/10/2013 05:37:15
by Asics Europe  (Standard support level)
Joined: 03/04/2013
Posts: 12

I experience a connection error resulting in code 10058 (connection lost).
The main error looks something with authentication, if I look at the messages
- Authentication type 4 failed
- SSH error 114

What does this mean?

The log files show this info:

[10-4-2013 12:27:54.446] EldoS SFTP Adapter (send): ProcessMessage()
[10-4-2013 12:27:54.462] Searching for installed BizCrypto addons.
[10-4-2013 12:27:54.462] No addons found (the exact message: BizCrypto.BizTalk.Addons. Could not load file or assembly 'BizCrypto.BizTalk.Addons, Version=9.1.216.0, Culture=neutral, PublicKeyToken=5a62fa96d0ac431a' or one of its dependencies. The system cannot find the file specified.)
[10-4-2013 12:27:54.477] EldoS SFTP Adapter: Loading private key
[10-4-2013 12:27:54.477] EldoS SFTP Adapter: Loading trusted keys
[10-4-2013 12:27:54.493] EldoS SFTP Adapter: Opening connection to SFTP server
[10-4-2013 12:27:54.962] EldoS SFTP Adapter: Running key validation handler
[10-4-2013 12:27:54.977] EldoS SFTP Adapter: All keys are trusted, exiting
[10-4-2013 12:27:55.212] EldoS SFTP Adapter: Authentication type 4 failed
[10-4-2013 12:27:55.227] EldoS SFTP Adapter: SSH error 114
[10-4-2013 12:27:55.227] EldoS SFTP Adapter: Call stack: at BizCrypto.BizTalk.Adapters.SFTP.SFTPCommon.OnError(Object Sender, Int32 ErrorCode)
at SBSimpleSftp.TElSimpleSFTPClient.DoError(Object Sender, Int32 ErrorCode)
at SBSSHCommon.TElSSHClass.DoError(Int32 ErrorCode)
at SBSSHClient.TElSSHClient.SSH2ContinueAuthentication(String AuthTypes)
at SBSSHClient.TElSSHClient.SSH2ParseServerUserauthFailure(Byte[] Buffer, Int32 Size)
at SBSSHClient.TElSSHClient.SSH2ParseOnUserauthLayer(Byte[] Buffer, Int32 Size)
at SBSSHClient.TElSSHClient.SSH2ParseOnTransportLayer(Byte[] Buffer, Int32 Size)
at SBSSHClient.TElSSHClient.AnalyseBuffer()
at SBSSHClient.TElSSHClient.DataAvailable()
at SBSimpleSftp.TElSimpleSFTPClient.DataAvailable()
at SBSimpleSftp.TElSimpleSFTPClient.IntMessageLoop()
at SBSimpleSftp.TElSimpleSFTPClient.DoMessageLoop()
at SBSimpleSftp.TElSimpleSFTPClient.Open()
at BizCrypto.BizTalk.Adapters.SFTP.SFTPCommon.OpenClient()
at BizCrypto.BizTalk.Adapters.SFTP.SFTPCommon.DoWork(Trace trace, IBaseMessage message, AdapterProperties props, Boolean upload, ArrayList fileList, ImpersonateUser& impersonateUser)
at BizCrypto.BizTalk.Adapters.SFTP.SFTPAsyncTransmitterBatch.ProcessMessage(IBaseMessage message, AdapterProperties props)
at BizCrypto.BizTalk.Adapters.SFTP.SFTPAsyncTransmitterBatch.TransmitMessage(TransmitterMessage msg)
at BizCrypto.BizTalk.Adapters.AsyncTransmitterBatch.ProcessWorkItem()
at BizCrypto.BizTalk.Adapters.ThreadPool.WorkerThreadThunk(Object state)
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

[10-4-2013 12:27:55.258] EldoS SFTP Adapter: Failed to transfer file(s): Connection lost (error code is 10058)

Stack:
at SBSimpleSftp.TElSimpleSFTPClient.DoSend(Object Sender, Byte[] Buffer)
at SBSSHCommon.TElSSHClass.DoSend(Byte[] Buffer, Int32 Size)
at SBSSHClient.TElSSHClient.SSH2SendOnTransportLayer(Int32 Size)
at SBSSHClient.TElSSHClient.SSH2SendDisconnect(Int32 ReasonCode, Byte[] Desc)
at SBSSHClient.TElSSHClient.PerformClose(Boolean Forced, String CloseReason)
at SBSSHClient.TElSSHClient.CloseByError(String ReasonLine)
at SBSSHClient.TElSSHClient.SSH2ContinueAuthentication(String AuthTypes)
at SBSSHClient.TElSSHClient.SSH2ParseServerUserauthFailure(Byte[] Buffer, Int32 Size)
at SBSSHClient.TElSSHClient.SSH2ParseOnUserauthLayer(Byte[] Buffer, Int32 Size)
at SBSSHClient.TElSSHClient.SSH2ParseOnTransportLayer(Byte[] Buffer, Int32 Size)
at SBSSHClient.TElSSHClient.AnalyseBuffer()
at SBSSHClient.TElSSHClient.DataAvailable()
at SBSimpleSftp.TElSimpleSFTPClient.DataAvailable()
at SBSimpleSftp.TElSimpleSFTPClient.IntMessageLoop()
at SBSimpleSftp.TElSimpleSFTPClient.DoMessageLoop()
at SBSimpleSftp.TElSimpleSFTPClient.Open()
at BizCrypto.BizTalk.Adapters.SFTP.SFTPCommon.OpenClient()
at BizCrypto.BizTalk.Adapters.SFTP.SFTPCommon.DoWork(Trace trace, IBaseMessage message, AdapterProperties props, Boolean upload, ArrayList fileList, ImpersonateUser& impersonateUser)
[10-4-2013 12:27:55.258] EldoS SFTP Adapter: Closing the connection
[10-4-2013 12:27:55.274] EldoS SFTP Adapter (send): Error: Connection lost (error code is 10058)
#24538
Posted: 04/10/2013 05:46:40
by Ken Ivanov (EldoS Corp.)

The log says that the adapter failed to authenticate to the server. The failed authentication type is indicated as 4 (password-based authentication). Please re-check that you pass the correct password to the Password property of the adapter.
#24540
Posted: 04/10/2013 06:02:25
by Asics Europe  (Standard support level)
Joined: 03/04/2013
Posts: 12

Correct again, thanks!
#30645
Posted: 09/08/2014 19:11:57
by Ivan P (Basic support level)
Joined: 04/11/2011
Posts: 66

Hi there,

I have a similar issue. We use TElSimpleSFTPClient (.Net version).
When username or password is incorrect, the Open() method throws EElSimpleSFTPClientError with ErrorCode 10058.

As in the case described above, we catch events: OnAuthenticationFailed( Authtype =4), and then OnError (Error =114) - which means no more auth attempts (only password auth is used).

When I connect with Winscp or Putty, they say: Access Denied.

My questions are:
1. Is it proper to report to user "Access Denied" error (which is more user friendly) after receiving ERROR_SSH_NO_MORE_AUTH_METHODS_AVAILABLE ?
I can see there's also ERROR_SSH_AUTHENTICATION_FAILED in the documentation, but I have never seen this error.

2. Is it correct that TElSimpleSFTPClient.Open() method even after receiving ERROR_SSH_NO_MORE_AUTH_METHODS_AVAILABLE still throws 10058 error instead of real SSH error?
Or is it just happens because of incorrect server implementation (what might happen, as I have read here on the forums)? The server is OpenSSH_3.7.1p2

3. Is it good if I throw AccessDeniedException from the OnError() handler (if the error was 114)?
I have found that in this case the same exception will be rethrown by the Open() method instead of unclear Connection lost 10058. Such workaround is more comfortable for us to use, but I'm not sure if it has any consequences.

Thanks,
IP
#30646
Posted: 09/09/2014 01:26:45
by Eugene Mayevski (EldoS Corp.)

SSH and SFTP errors are reported by the server. You get what they report.

There exist many servers, however, which don't behave correctly. They just close socket connection without sending any notification to the client and without gracefully shutting down connection. When this happens, you get socket error (10058 is "Connection Reset" Winsock error).

So it's up to your application to track authentication errors like ERROR_SSH_NO_MORE_AUTH_METHODS_AVAILABLE and report the authentication failure if the connection is closed after that.

Quote
Ivan P wrote:
Is it good if I throw AccessDeniedException from the OnError() handler (if the error was 114)?


Yes, that's possible. Just remember to call Close() after any call to Open, including the failed ones.


Sincerely yours
Eugene Mayevski
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.

Reply

Statistics

Topic viewed 12754 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!