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

New Post: ssh conversation

$
0
0
Hello. First of all, thanks both of you for your time.

This is what I got so far:
    Dim ConnString As New Renci.SshNet.PasswordConnectionInfo("myserver.com", "xx65", "password")
        Dim sshConn As New Renci.SshNet.SshClient(ConnString)
        Dim comm As Renci.SshNet.SshCommand
        
        Using sshConn
            sshConn.Connect()
            
            'Execute command and print the results. 
            comm = sshConn.RunCommand(" tail -50 /var/log/messages | uname -a")
            RichResult.Text = comm.Result
    
    sshConn.Disconnect()
        End Using
I can only send one command and do not know how to interact with the ouputs at server and do not how to get them. As you can notice, I'm pretty new in vb.net. Once I'm connected as a regular user I need to get root priviligies so I can run some health checks at server. Depending on the server, maybe I'll have to renew my password becacuse of the security policies (this is one of the reasons why I need to analyze the ouputs at server side). Once I'm root I'll be able to run the commands.

BogusException, I'm checking the example at your blog. It seems easy to understand, I hope I can get it

Thanks again.

Viewing all articles
Browse latest Browse all 1729

Trending Articles



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