sshshell user auth not supported?

Jan 25, 2012 at 9:28 PM
Edited Jan 25, 2012 at 9:29 PM

http://localhostr.com/files/Qub8cvz/capture.png

 

trying to figure out why its telling me this.

 

code:

 user = txtuser.Text
        host = txthost.Text
        password = txtpassword.Text
        port = txtport.Text
        '
        Dim ssh As SshClient = New SshClient(host, CInt(port), user, password)

        Try
            ssh.Connect()


            Dim results = ssh.RunCommand("hostname")
            Label5.Text = results.Result
            ' MsgBox(test.Result)


            results = ssh.RunCommand("uptime")
            Label8.Text = results.Result



            results = ssh.RunCommand("sysctl hw.physmem")




            Dim totalram As Integer = CInt(results.Result.ToString.Substring(12, results.Result.ToString.Length - 12))
            memprog.Maximum = totalram

            results = ssh.RunCommand("sysctl vm.stats.vm.v_inactive_count")
            Dim mem_inactive As Integer = CInt(results.Result.ToString.Substring(30, results.Result.ToString.Length - 30))

            results = ssh.RunCommand("sysctl vm.stats.vm.v_cache_count")
            Dim mem_cache As Integer = CInt(results.Result.ToString.Substring(27, results.Result.ToString.Length - 27))

            results = ssh.RunCommand("sysctl vm.stats.vm.v_free_count")
            Dim mem_free As Integer = CInt(results.Result.ToString.Substring(26, results.Result.ToString.Length - 26))

            memprog.Value = totalram - (mem_cache + mem_free + mem_inactive)
            memprog.Refresh()
            Label11.Text = "Total Free" & (mem_cache + mem_free + mem_inactive).ToString



            results = ssh.RunCommand("top -n")
            Dim swapinfo As String()
            swapinfo = results.Result.ToString.Split("Swap:")
            ssh.Disconnect()
            Try
                Dim tempswapingo As String()
                tempswapingo = swapinfo(1).ToString.Split(",")
                Dim totalswap As String = tempswapingo(0).Substring(4, tempswapingo(0).Length - 11)
                Dim freeswap As String = tempswapingo(1).Substring(0, tempswapingo(0).Length - 11)
                'Label11.Text = "Total avilable: " & tempswapingo(0).Substring(4, tempswapingo(0).Length - 10)
                swapprog.Maximum = CInt(totalswap)
                Dim usage As Integer = (CInt(totalswap) - CInt(freeswap))
                'Label11.Text = "Total used: " & usage.ToString
                swapprog.Value = usage
                swapprog.Refresh()

                RichTextBox1.Text = totalswap
                RichTextBox1.Text = RichTextBox1.Text & vbCrLf & freeswap
            Catch ex As Exception

            End Try

        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try

Coordinator
Jan 25, 2012 at 9:43 PM

Hi,

It means that the server that you trying to connect to does not support private key file, password or interactive authentication.

Only those 3 are currently supported.

Its possible that server only suports host based authentication, certificate or something else.

 

If you using latest source version, you can set up a breakpoint in Session.cs file line 552 and look at what AllowedAuthentications contains and let me know.

 

I'll see if I can implement it.

 

Hope it helps.

 

Thanks,

Oleg

Jan 25, 2012 at 9:58 PM

ill do so shortly.

its weird though that putty uses user login and it works.. not using private keys at this point.

Coordinator
Jan 25, 2012 at 10:19 PM

Well,

if it works with putty then I guess you need to use different authentication method, most likely you will need to use KeyboardInteractiveConnectionInfo object to established connection.

 

Thanks,

Oleg

Jan 25, 2012 at 10:43 PM

your right.

[0] = "publickey"
[1] = "keyboard-interactive"

Apr 13, 2012 at 11:19 PM
Edited Apr 23, 2012 at 8:13 PM

Does the current version support Hosts authentication? That is the one not listed here.

Coordinator
Apr 24, 2012 at 1:37 PM

Hi,

 

Sorry for late response,

No, currently there is no support for host based authentication.

 

Thanks,

Oleg