问题
I need to send special keys to a remote terminal, how can I do that with JSCH?
Thanks,
Walter
回答1:
Try sending two bytes: 0x03, 0x04.
Check ASCII table for more.
回答2:
I switched to sshj and use the signal enumeration to send signals, if needed.
Walter
回答3:
You can send a signal like this:
channel.sendSignal("2"); // sends (CTRL+C) signal
来源:https://stackoverflow.com/questions/4167818/jsch-send-special-keys-ctrl-c-ctrl-d-etc