try {
client = SshClient.setUpDefaultClient();
client.start();
ClientSession session = client.connect(host, port);
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);