|
I am trying to close or open one of the port on Cisco Router 2811. When using putty, here are the commands After SSH login config t int f0/0/0 no shutdown I was able to login router using Rebex SSH lib. I then
Which returns correct response. The router is now in config mode. the command prompt looks like this now: router1(config)# I then send respString = ssh.RunCommand("int f0/0/0\r\n"); Which cause the following exception: Rebex.Net.SshException: Error while sending packet. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at Rebex.Net.ProxySocket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at Rebex.Net.SshSession.clmbOg(BBdsJfZ , Boolean ) --- End of inner exception stack trace --- at Rebex.Net.SshSession.clmbOg(BBdsJfZ , Boolean ) at Rebex.Net.SshSession.clmbOg(BBdsJfZ ) at Rebex.Net.SshSession.BGzjKi(SshChannelType , Int32 , Object[] ) at Rebex.Net.SshSession.OpenSession() at Rebex.Net.Ssh.StartCommand(String command) at TestSSH.Form1.btnConnect_Click(Object sender, EventArgs e) in |
|
To determine the cause of the exception we need a communication log. How it can be produced is described here. Can you send it to support@rebex.net please? Some comments to your code: 1) the 2) there is no need to specify \r\n in the |