I want to run commands related to Openwrt in my C# application.I use renci ssh.net and also SharpSSH libraries to run the commands.They work fine in running other commands e.g. free,cat,df etc... but return with not found for others like uci and wifi.Here is my code runs without any error:
SshClient Client = new SshClient("192.168.1.1", "root", "12334456");
Client.Connect();
SshCommand sc= Client.CreateCommand("uci set wireless.@wifi-iface[1].disabled=1");
sc.Execute();
After running sc.error has below value:
"ash: uci: not found"
also running other commands like wifi
have similar result.I don't have such a problem using putty.
How can I run these commands in my c# application?
After some days of try and error finally kind Chilkat Software support answer my question :
Most of SSH library have something like stream or shell.I try that and the error didn't appear anymore.