static S sshCommand(SSHClient client, S command) ctex { final Session session = client.startSession(); try { Session.Command cmd = session.exec(command); ret IOUtils.readFully(cmd.getInputStream()).toString(); } finally { session.close(); } }