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 two specific commands doesn't work, and I can't seem to understand why.
The commands that fail are: changeto Production
and terminal length 0
.
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 Production");
// Other command follow
}
While running the same commands 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.