session.authPassword(user, password);
ClientChannel channel = session.createChannel("shell");
channel.setIn(new ConsoleReader().getInput());
channel.setOut(System.out);
channel.setErr(System.err);
channel.open();
channel.waitFor(ClientChannel.CLOSED, 0);
} catch (Throwable t) {
t.printStackTrace();
System.exit(1);
} finally {