SshClient client = SshClient.setUpDefaultClient();
client.start();
ClientSession session = client.connect("localhost", port).await().getSession();
session.authPassword("smx", "smx");
ClientChannel channel = session.createChannel(ClientChannel.CHANNEL_SHELL);
PipedOutputStream pipedIn = new PipedOutputStream();
channel.setIn(new PipedInputStream(pipedIn));
ByteArrayOutputStream out = new ByteArrayOutputStream();
ByteArrayOutputStream err = new ByteArrayOutputStream();
channel.setOut(out);
channel.setErr(err);