I am trying to send an ssh command with C# but I'm getting an error for the SshClient. What namespace reference do I need so that it is accepted? Do I need to install Openssh on the Microsoft server?
I'm open to other suggestions if you have a better way to send a command. It's a very simple script:
using (var client = new SshClient("IP", "username", "password"))
{
client.Connect();
client.RunCommand("the command I'd like to run");
client.Disconnect();
}
Hi Daniel,
You will need to install the SSH.Net nuget package and add a reference to the Renci.SshNet namespace by adding "using Renci.SshNet;" on top of your script.
Depending on your requirements, it might be more useful to move your SSH communication to a driver. More information on this can be found in our development guide here.