SSHAuthenticationExcionion: There is no suitable authentication method to complete authentication

I am trying to connect on a server in winb.net forms. I click the button and the text area to get the data. But I can not connect to the server. The server is open because I can ping it.

Private Sub SimpleButton1_Click(sender As System.Object, e As System.EventArgs) Handles SimpleButton1.Click Dim PasswordConnection = New PasswordAuthenticationMethod("username", "pass") Dim KeyboardInteractive = New KeyboardInteractiveAuthenticationMethod("username") Dim ConnectionInfo = New ConnectionInfo("server.com", 22, "username", PasswordConnection, KeyboardInteractive) Using client As New SshClient(ConnectionInfo) 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 MemoEdit1.Text = cmd.ExitStatus If String.IsNullOrEmpty(result2) Then MemoEdit1.Text = result2 End If MemoEdit1.Text = result client.Disconnect() End Using End Sub 

Am I doing something wrong?
The program stuck directly to "client.Connect ()". As you can see, I'm trying to connect to the click of the SimpleButton1 event

+6
source share
1 answer

Typically, No suitable authentication method found to complete authentication is used returned from the SSH server when the server does not allow authentication by the client methods.

An SSH server can only allow public key authentication or some two-factor authentication, which in turn prevents password authentication. Download an SSH client, such as Putty , and try connecting directly to the server and see what the result is.

+5
source

Source: https://habr.com/ru/post/948650/


All Articles