title: execute sequense of commands in sshj
body: <p>I need to execute some sequence of commands at the remote server via ssh, using sshj library.</p>
  
  <p>I do</p>
  
  <pre><code>        Session session = ssh.startSession();
          Session.Command cmd = session.exec("ls -l");
          System.out.println(IOUtils.readFully(cmd.getInputStream()).toString());
          cmd.join(10, TimeUnit.SECONDS);
          Session.Command cmd2 = session.exec("ls -a");
          System.out.println(IOUtils.readFully(cmd2.getInputStream()).toString());
  </code></pre>
  
  <p>and it throws me </p>
  
  <blockquote>
    <p>net.schmizz.sshj.common.SSHRuntimeException: This session channel is
    all used up</p>
  </blockquote>
  
  <p>But I can't recreate session for every single command, because this example it will show home directory list, but not the /some/dir list.</p>