jsch - send special keys (CTRL-C, CTRL-D, etc.)
I need to send special keys to a remote t开发者_StackOverflow中文版erminal, how can I do that with JSCH?
Thanks,
Walter
Try sending two bytes: 0x03, 0x04.
Check ASCII table for more.
I switched to sshj and use the signal enumeration to send signals, if needed.
Walter
You can send a signal like this:
channel.sendSignal("2"); // sends (CTRL+C) signal
精彩评论