This project is read-only.

The lib refuses to connect to ESXi 5.0+

Mar 30, 2012 at 9:43 PM

Hi, I tried to connect to two ESXi hosts (5.0 with the update 01, identified also as 5.0.0.623860). 

Both versions of the library, 3.5 and 4.0, couldn't connect with the SshAuthenticationException. "No suitable authentication method found to completeauthentication."

The library happily connects to ESXi 4.0 and 4.1, whereas plink and putty go ahead and connect to all the ESXis I have even without asking the port number.

After investigating into the problem, all that I could retrieve is that

1.) SSH 2.0 Server 5.6

2.) allowedAuthentications contains two values: "publickey" and "keyboard-interactive"

3.) AuthenticationMethods returns "The object does not have an indexer property"

The log is hardly useful:

SshNet.Logging Verbose: 1 : Initiating connect to '10.30.42.238:22'.SshNet.Logging Verbose: 1 : Server version '2.0' on 'OpenSSH_5.6'.SshNet.Logging Verbose: 1 : ReceiveMessage from server: 'KeyExchangeInitMessage': 'SSH_MSG_KEXINIT'.SshNet.Logging Verbose: 1 : SendMessage to server 'KeyExchangeInitMessage': 'SSH_MSG_KEXINIT'.SshNet.Logging Verbose: 1 : SendMessage to server 'KeyExchangeDhGroupExchangeRequest': 'SSH_MSG_KEX_DH_GEX_REQUEST'.SshNet.Logging Verbose: 1 : ReceiveMessage from server: 'KeyExchangeDhGroupExchangeGroup': 'SSH_MSG_KEX_DH_GEX_GROUP'.SshNet.Logging Verbose: 1 : SendMessage to server 'KeyExchangeDhGroupExchangeInit': 'SSH_MSG_KEX_DH_GEX_INIT'.SshNet.Logging Verbose: 1 : ReceiveMessage from server: 'KeyExchangeDhGroupExchangeReply': 'SSH_MSG_KEX_DH_GEX_REPLY'.SshNet.Logging Verbose: 1 : SendMessage to server 'NewKeysMessage': 'SSH_MSG_NEWKEYS'.SshNet.Logging Verbose: 1 : ReceiveMessage from server: 'NewKeysMessage': 'SSH_MSG_NEWKEYS'.SshNet.Logging Verbose: 1 : SendMessage to server 'ServiceRequestMessage': 'SSH_MSG_SERVICE_REQUEST'.SshNet.Logging Verbose: 1 : ReceiveMessage from server: 'ServiceAcceptMessage': 'SSH_MSG_SERVICE_ACCEPT'.SshNet.Logging Verbose: 1 : SendMessage to server 'RequestMessageNone': 'SSH_MSG_USERAUTH_REQUEST'.SshNet.Logging Verbose: 1 : ReceiveMessage from server: 'BannerMessage': 'SSH_MSG_USERAUTH_BANNER'.SshNet.Logging Verbose: 1 : ReceiveMessage from server: 'FailureMessage': 'SSH_MSG_USERAUTH_FAILURE'.

Is it enough to fix the problem or I need provide a bit more information?

Coordinator
Apr 3, 2012 at 9:28 PM

Sorry for not responding sooner,

busy with other project.

 

But basically what happens here is you trying to connect using authentication that is not supported by your server.

 

Did you try to use KeyboardInteractiveConnectionInfo or PrivateKeyConnectionInfo classes to connect?

 

I think it should work for you.

 

Let me know if it still doesn't work for you and I will take a further look.

 

Thanks,

Oleg