Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: VB SSH 2 commands

$
0
0
Hello, im trying to send 2 commands by ssh with Visual Basic but when i send the 1st command the tool stop responding. ssh client connects but the commands are not working i dont know why. (In putty works)
What is wrong?
Private Sub bt_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_update.Click
        Dim connInfo As New Renci.SshNet.PasswordConnectionInfo("111.111.1.1", TextBox1.Text, TextBox2.Text)
        Dim sshClient As New Renci.SshNet.SshClient(connInfo)
        Dim cmd As Renci.SshNet.SshCommand


        Using sshClient
            sshClient.Connect()

            cmd = sshClient.RunCommand("configure terminal")
            cmd = sshClient.RunCommand("users")

            sshClient.Disconnect()
        End Using
    End Sub

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>