title: "value cannot be null, parameter name data" error with Renci.SshNet.sshclient.connect()
body: <p>I'm using for the first time the library Renci.SshNet.dll. I downloaded the version 2014.4.6-beta2.</p>
  
  <p>I want to ssh connect to a server. Of course, the connection works with Putty using my login and password.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Dim PWAuthMeth = New PasswordAuthenticationMethod(Login, Password)
  Dim KIAuthMeth = New KeyboardInteractiveAuthenticationMethod(Login)
  Dim ConnectionInfo As New ConnectionInfo(ServerName, 22, Login, PWAuthMeth, KIAuthMeth)
  Dim SshClient1 As New SshClient(ConnectionInfo)
  SshClient1.Connect()
  </code></pre>
  
  <p>The connect() method gives me an ArgumentNullException, message (in french): </p>
  
  <blockquote>
    <p>"La valeur ne peut pas être null. Nom du paramètre : data"</p>
  </blockquote>
  
  <p>The StackTrace :  </p>
  
  <pre><code>à Renci.SshNet.KeyboardInteractiveAuthenticationMethod.Authenticate(Session session)
  à Renci.SshNet.AuthenticationMethod.Renci.SshNet.IAuthenticationMethod.Authenticate(ISession session)
  à Renci.SshNet.ClientAuthentication.TryAuthenticate(ISession session, AuthenticationState authenticationState, ICollection`1 allowedAuthenticationMethods, SshAuthenticationException&amp; authenticationException)
  à Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
  à Renci.SshNet.ConnectionInfo.Authenticate(ISession session)
  à Renci.SshNet.Session.Connect()
  à Renci.SshNet.BaseClient.Connect()
  à ConsoleApplication1.Upload.LancerUpload() dans D:\Travail\ENSAM\Promotion\Logiciel\PromoAM-Export\PromoAM-Export\Class_Upload.vb:ligne 19
  ...
  </code></pre>
  
  <p>I tried others versions of the dll, but the error is the same.</p>
  
  <p>I found this topic:<br>
  <a href="https://stackoverflow.com/questions/15686276/unable-to-connect-to-aixunix-box-with-ssh-net-library-error-value-cannot-b">Unable to connect to AIX(Unix) box with SSH.NET Library - Error : Value cannot be null</a><br>
  The problem seems to be quite similar, so I tried to translate c# to vb.net:</p>
  
  <pre><code>Private Sub HandleKeyEvent(sender As Object, e As Renci.SshNet.Common.AuthenticationPromptEventArgs)
      For Each prompt As Renci.SshNet.Common.AuthenticationPrompt In e.Prompts
          If prompt.Request.IndexOf("Password:", StringComparison.InvariantCultureIgnoreCase) &lt;&gt; -1 Then
              prompt.Response = Password
          End If
      Next
  End Sub
  </code></pre>
  
  <p>But</p>
  
  <pre><code>KIAuthMeth.AuthenticationPrompt += ...
  </code></pre>
  
  <p>is not recognised. I'm stuck.</p>
  
  <p>Any Idea ? Am I on the right way ?</p>