Yes, you can have a look at the the JLine SSH support (
https://github.com/jline/jline3/blob/860c0d64a874ab7e327b0a21cc434a9aaf232149/remote-ssh/src/main/java/org/jline/builtins/ssh/Ssh.java
).
What you need is to configure the SSH connection with the correct control
char (
https://github.com/jline/jline3/blob/860c0d64a874ab7e327b0a21cc434a9aaf232149/remote-ssh/src/main/java/org/jline/builtins/ssh/Ssh.java#L181),
then handle the INT interrupt signal and forward through the SSH channel (
https://github.com/jline/jline3/blob/860c0d64a874ab7e327b0a21cc434a9aaf232149/remote-ssh/src/main/java/org/jline/builtins/ssh/Ssh.java#L250-L257
)

Le ven. 18 déc. 2020 à 05:50, 小号 <280155...@qq.com> a écrit :

> Hello, is there an example of ssh server capturing the user's exit by
> inputting crtl + C?
>
>
> 你好,有没有ssh server 捕获用户输入crtl + c 退出的例子?



-- 
------------------------
Guillaume Nodet

Reply via email to