开发者

jsch - send special keys (CTRL-C, CTRL-D, etc.)

开发者 https://www.devze.com 2023-01-25 08:30 出处:网络
I need to send special keys to a remote t开发者_StackOverflow中文版erminal, how can I do that with JSCH?

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
0

精彩评论

暂无评论...
验证码 换一张
取 消