How to make ssh to kill remote process when I interrupt ssh itself?

In a bash script I execute a command on a remote machine through ssh. If user breaks the script by pressing Ctrl+C it only stops the script - not even ssh client. Moreover even if I kill ssh client the remote command is still running...

How can make bash to kill local ssh client and remote command invocation on Crtl+c?

A simple script:

ssh -n -x root@db-host 'mysqldump db' -r file.sql


Eventual I found a solution like that:

ssh -t -x root@db-host 'mysqldump db' -r file.sql

So - I use '-t' instead of '-n'. Removing '-n', or using different user than root does not help.

Need Your Help

Reverting the Load statement of Impala?

hadoop cloudera impala

I have created a table on Impala and loaded data into table.

I want to develop an iPhone app using AIR and ActionScript 3 and I need the app to receive MIDI. How?

ios actionscript-3 air coremidi

I am not entirely sure of how these associations work. iOS implements CoreMIDI. Ok. It's possible to build an app with CoreMIDI support with XCode and objective C. I don't own a Mac and I am absolu...