Package gri.ssh

Examples of gri.ssh.Shell


        if (sftpChannel.isConnected())
          sftpChannel.disconnect();
      }

      //execute script:
      Shell shell = new Shell(session);

      StringBuffer sshScript = new StringBuffer();
      sshScript.append("cd ").append(remotePath).append("\n");
      sshScript.append(execCmd)
           .append(" > ").append(stdoutFile)
           .append(" 2> ").append(stderrFile).append("\n");
      sshScript.append("exit\n")//don't forget this

      shell.execute(sshScript.toString());
     
      //completion:
      processComplete();
    }
    finally {
View Full Code Here

TOP

Related Classes of gri.ssh.Shell

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.