You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using (SshClient ssh = new SshClient(address, username, password) {
ssh.Connect()
using (ShellStream shell = ssh.CreateShellStream("xterm", 80, 80, 80, 80, 1024)) {
// Do stuff
}
// I expect to be able to use the SshClient instance here but in fact it is disconnected
}
The text was updated successfully, but these errors were encountered:
@ahelwer Looking at ShellStream.Dispose, there is no code that actually calls a disconnect. Are you sure it is not the end-device closing the connection? ShellStream creates a Channel that sends the ShellStream data back and forth. During the ShellStream Dispose, the Channel is closed (not the full SshClient).
@keithallenjackson you are correct, this only happens on some devices and not others. For example, I can confirm it occurs on the Cisco 4431 router running IOS-XE v16, but not the Cisco Nexus 3064 running NXOS v6.
Actually, it's even worse - I have to reconnect the SshClient instance after every single command execution (or shell instance closure) on the Cisco 4431!
The text was updated successfully, but these errors were encountered: