Ssh

hobbit666

Member
Joined
Jun 7, 2007
Messages
6
Location
Newtown, Wales
Programming Experience
Beginner
I'm trying to make a small program that pings an IP address. If it fails to ping 3 times the application will reboot a router.

I have tried using telnet but kept getting socket errors all the time so i thought why not use SHH.

Can anyone point out to me a goos guide and component to add SSH to my VB.NET application(s)
 
Hello,
can you connect to the router and reboot it with SSH client such as Putty?

If it's possible you can try following code (which uses Rebex SSH Shell component). Code is taken from SSH tutorial page. Replace the command "uname -a" with reboot command.

VB.NET:
' create client, connect and log in  
Dim client As New Ssh
client.Connect(hostname)
client.Login(username, password)

' run the 'uname' command to retrieve OS info 
Dim systemName As String = client.RunCommand("uname -a")
' display the output 
Console.WriteLine("OS info: {0}", systemName)
 
Back
Top