EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElSimpleSSHClient.Open() occasionally cause the exceception!!

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#36560
Posted: 04/23/2016 05:28:31
by Hejian Lin (Standard support level)
Joined: 04/21/2016
Posts: 5

I just purchase the SecureBlackbox Transports .NET
Version is : 14.0.290.0
Running on : Windows 2012 Sever R2

My problem is when I can TElSimpleSSHClient.Open() method, occasionally got the following exception:

Quote

System.MethodAccessException: Attempt by security transparent method 'SBSSHClient.TElSSHClient.SSH2EstablishAuthPublicKeyAgent(Int32)' to access security critical method 'SBSSHAuthAgent.__Global.PageantAvailable()' failed.

Assembly 'SecureBlackbox.SSHClient, Version=14.0.290.0, Culture=neutral, PublicKeyToken=dd7d30884001c5e2 is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model. Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.
at SBSSHClient.TElSSHClient.SSH2EstablishAuthPublicKeyAgent(Int32 KeyIndex)
at SBSSHClient.TElSSHClient.SSH2ContinueAuthentication(String AuthTypes)
at SBSSHClient.TElSSHClient.SSH2ParseServerUserauthFailure(Byte[] Buffer, Int32 Size)
at SBSSHClient.TElSSHClient.SSH2EstablishAuthPublicKey(Int32 KeyIndex)
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 SBSimpleSSH.TElSimpleSSHClient.IntMessageLoop(Boolean NoPeek)
at SBSimpleSSH.TElSimpleSSHClient.DoMessageLoop(Boolean NoPeek)
at SBSimpleSSH.TElSimpleSSHClient.Open()

Can anybody help me?
#36561
Posted: 04/23/2016 05:44:39
by Eugene Mayevski (EldoS Corp.)

Thank you for contacting us.

Please check that you set AuthenticationTypes property of the SSH client component to methods that you want to use. This property should NOT include SSH_AUTH_TYPE_PUBLICKEYAGENT as this flag causes an error.

We will check, if we can set PageantAvailable method security-transparent.


Sincerely yours
Eugene Mayevski
#36562
Posted: 04/23/2016 05:51:50
by Hejian Lin (Standard support level)
Joined: 04/21/2016
Posts: 5

Hi Eugene

Thanks for your quick reply.

I just checked my code, currently it's:
_sshClient.AuthenticationTypes = 255;

What's value I should set?
#36563
Posted: 04/23/2016 06:00:25
by Eugene Mayevski (EldoS Corp.)

You need to set it to combination of values that you want to use. If you have just a public/private keypair, then you don't want AuthenticationTypes to include Keyboard-Interactive authentication.

By default the property is set to enable password and keyboard-interactive authentication.

The sample shows how to add publickey to the list:

Code
sshClient.AuthenticationTypes |= SBSSHConstants.Unit.SSH_AUTH_TYPE_PUBLICKEY;


Please refer to the help file for information about available constants.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 1343 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!