SshClient client = SshClient.setUpDefaultClient();
client.start();
ClientSession session = client.connect("localhost", port).await().getSession();
session.authPassword("smx", "smx").await().isSuccess();
ChannelExec channel = session.createExecChannel("test");
channel.setOut(new NoCloseOutputStream(System.out));
channel.setErr(new NoCloseOutputStream(System.err));
channel.open().await();
Thread.sleep(100);
try {
for (int i = 0; i < 100; i++) {
channel.getInvertedIn().write("a".getBytes());