Hello.
I'm using SSH.NET to connect (with username + password) to a server and run some commands. Connection to server is made to manage some components via Cisco Application Control Software, but that shouldn't matter because command are sent as they are.
Connection to server works well, all other commands work too but one specific command doesn't work, and I can't seem to understand why.
The command that fails is: "changeto Production".
My code is pretty simple (simplified for the question, but same flow):
I think the problem here is changing scopes (changeto Production) via code, but can't understand why.
Any help will be appreciated.
Thanks!
I'm using SSH.NET to connect (with username + password) to a server and run some commands. Connection to server is made to manage some components via Cisco Application Control Software, but that shouldn't matter because command are sent as they are.
Connection to server works well, all other commands work too but one specific command doesn't work, and I can't seem to understand why.
The command that fails is: "changeto Production".
My code is pretty simple (simplified for the question, but same flow):
using (var client = new SshClient(serverIP, port, username, password)
{
client.Connect();
var cmd = Client.RunCommand("terminal length 0");
cmd = client.RunCommand("changeto Producation");
// Other command follow
}
While running the same command via putty it works, and no, "changeto" shouldn't be "change to".I think the problem here is changing scopes (changeto Production) via code, but can't understand why.
Any help will be appreciated.
Thanks!