Command using ChannelExec not executed - Jsch
问题 I am using Jsch to create a file in the server and execute some commands. For the file creation, it's working fine, however, for the command execution, doesn't. It keeps the status -1 (still working on it) and keep there forever. This happen for shell execution or when I try to became root. Follow the method used below: public void upload(String localPath) throws IOException { Session session = connectToServer(); System.out.println("In upload"); ChannelSftp channelSftp =