https://bugzilla.mindrot.org/show_bug.cgi?id=3550
--- Comment #6 from Darren Tucker <dtuc...@dtucker.net> --- (In reply to maggiezhuooo from comment #5) > Sorry to bother you again, but when I run an app on a remote server > using ssh -t command, when I type ^c, the app stops running and SSH > shuts down with it. I want SSH to not shut down with the app > stopping, i.e. when the app returns to a stopped state, is there a > way to make SSH ignore this state and continue running? Because I > want to continue to use ssh to interact with the remote server. Depends on what exactly you want it to do. If you want the app to do something other than exit on receipt of SIGINT, you need to somehow tell the app to do something different. If you want the app to exit but ssh to keep the shell up it's possible although a bit convoluted: you need the remote login shell to kill its child on receipt of SIGINT but not die itself, then invoke an interactive shell for you to interact with, something like: $ ssh -v -t localhost "trap 'kill -INT -$$' INT; sleep 60; PS1='remoteshell$ ' sh -i" [...] ^Cremoteshell$ exit [...] debug1: Exit status 0 The trap sends a SIGINT to the process group of the login shell which includes the "app", which exits, causing the login shell to start another (interactive) shell. -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug. _______________________________________________ openssh-bugs mailing list openssh-bugs@mindrot.org https://lists.mindrot.org/mailman/listinfo/openssh-bugs