0 votes
by (8.4k points)
edited

I'm trying to write a small program that will send a restart command to my firewall when a button is pressed or a condition is met.

1 Answer

0 votes
by (13.0k points)
edited

Following code shows how to execute command via SSH on remote *nix server using Rebex SSH Shell component.

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

' run the command to restart the firewall
Dim result As String = client.RunCommand("command-to-restart-firewall")

' display the output 
Console.WriteLine("Result: {0}", result)
...