client.login(username, password);
// client.echo("HELLO");
// Thread.sleep(1 * 1000);
RemoteShellProxy shell = new RemoteShellProxy(client, io, terminal);
Object rv = SUCCESS;
try {
shell.run(command.toArray());
}
catch (ExitNotification n) {
// Make sure that we catch this notification, so that our parent shell doesn't exit when the remote shell does
rv = n.code;
}
shell.close();
io.verbose("Disconnecting");
client.close();