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
}