14

Get ssh to forward signals

view full story
linux-howto

http://unix.stackexchange.com – I want to be able to send signals (SIGINT is the most important) through ssh. This command: ssh server "sleep 1000;echo f" > foo will start sleep on server and after 1000 seconds it will put 'f\n' in the file foo on my local machine. If I press CTRL-C (i.e. send SIGINT to ssh) it will kill ssh, but it will not kill sleep on the remote server. I want it to kill sleep on the remote server. So I tried: ssh server -t "sleep 1000;echo f" > foo But if stdin is not a terminal I get this error: Pseudo-terminal will not be allocated because stdin is not a terminal. and then SIGINT is s (HowTos)