Hi all,
I want to invoke a shell script on remote Linuxmachine using JSch without
waiting for the STDOUT/STDERR from the shell. I have modified the code
available in JSch official website in the following manner-
String command = "sh /opt/scripts/start.sh";
JSch jsch = new JSch();
Session session = jsch.getSession(user, host, 22);
UserInfo ui = new MyUserInfo();
session.setUserInfo(ui);
session.connect();
Channel channel = session.openChannel("exec");
((ChannelExec) channel).setCommand(command);
channel.setInputStream(null);
channel.setOutputStream(null);
channel.connect();
channel.disconnect();
session.disconnect();
The above code works perfectly. But can i get the status of invoke signal? I
mean is there any way so that I can get that whether shell script is invoked
successfully or not? Also I don't want to wait for its execution and
STDOUT/STDERR.
-Ravi Joshi
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users