Hi,
+-From: gabriele mannocci <[email protected]> --
|_Date: Tue, 17 Apr 2012 16:08:08 +0200 _________________
|
|I'm sorry but after a lot of time searching for solution on how
|can I send "crtl+c" to stop tail -f command (with channel exec) I
|didn't try any solution... Does anyone have a solution?? I try
|with channel.sendSignal("QUIT") and outputstream.write(3) without
|success....
As far as I have recognized, OpenSSH's sshd does not
support 'channel.sendSignal("QUIT")'.
As for 'outputstream.write(3)', Ctrl+C must be for the pty,
so it should be allocated,
ChannelExec c = (ChannelExec)sesseion.openChannel("exec");
c.setPty(true); // !!!!!
c.setCommand("tail -f /etc/httpd/logs/acces_log");
InputStream in = c.getInputStream();
OutputStream out = c.getOutputStream();
c.connect();
...
out.write(3);
out.flush();
Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
Skype callto://jcraft/
Twitter: http://twitter.com/ymnk
Facebook: http://facebook.com/aymnk
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users