Is it possible to send a SIGTERM (or other) signal to a process inside ssh, for example:

ssh hostname 'sleep 10; echo done'

What can I do to interrupt the sleep command? If I press ctrl-c, the ssh command gets interrupted.

link|improve this question

50% accept rate
feedback

1 Answer

If you knew the pid of the remote process then you could do: ssh hostname 'kill -TERM $pid'

link|improve this answer
Pity, I hope this is not the only solution :) Thanks for your answer! – jabalsad Jan 25 at 11:38
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.