SSH in VB.net with Freebsd Server

Jun 14, 2012 at 3:30 PM
Edited Jun 14, 2012 at 3:30 PM

I am using the code in vb.net.

 

 

Using client As New SshClient("192.168.14.19", 22, "cooper", "cooper123")
            client.Connect()

            Dim cmd As SshCommand
            Dim result As String
            Dim result2 As String

            cmd = client.CreateCommand("who")
            cmd.CommandTimeout = TimeSpan.FromSeconds(10)
            result = cmd.Execute
            result2 = cmd.Error
            TextBox1.Text = cmd.ExitStatus

            If String.IsNullOrEmpty(result2) Then
                TextBox1.Text = result2
            End If

            TextBox1.Text = result

            client.Disconnect()
 End Using


When I run I am getting the error.

No suitable authentication method found to complete authentication.


I'm trying to connect to a freebsd server. with the putty is working perfectly.
Coordinator
Jun 14, 2012 at 4:05 PM

The most likely reason is that your server does not support password authentication but only Keyboard Interactive.

When you use putty its not obvious since it look the same.

 

Search this forum for examples of using "KeyboardInteractiveConnectionInfo" class. I dont have it handy now to post it.

 

Hope it helps.

Thanks,

Oleg

Jun 14, 2012 at 5:55 PM

ok, I'm waiting. Also I'm looking at it. thx

Jun 15, 2012 at 2:42 AM

 

I enabled the login password for my server and everything worked. thx