2

I'm trying from a C# program to interact with a mac (Mac mini 2018 - Mojave) through SSH and the SSH.NET library to launch a cordova build.

I can correctly configure SSH.NET to connect and send simple commands (cd, ls, pwd...).

But when I try to make a simple "cordova" to see the man from cordova I get this message:

cordova: command not found

I tried to connect directly from putty to type this command, no problem.

I don't understand why there's a difference between SSH.NET and Putty.

Here was my C# code:

using (var client = new Renci.SshNet.SshClient("xxx.xxx.xxx.xxx", "myUser", "myPassword"))
{
    client.Connect();
    var re = client.RunCommand("cordova");
    client.Disconnect();
}
halfer
  • 19,824
  • 17
  • 99
  • 186
Enzo B.
  • 2,341
  • 1
  • 11
  • 33

0 Answers0