Josef Wolf wrote:
I can get rid of this error message by deleting the "exec" keywords from the above script. But this effectively ignores the error. So the question is: what causes this "Killed by signal X"? Is it some sort of incompatibility between ssh and netcat?
The "outer" ssh command sends a SIGHUP to the proxycommand when it shuts down (some versions of netcat don't check for the closure of their stdin/stdout and would hang around forever).
By default, if ssh is killed by a signal it reports which one, which is what you're seeing (on Linux, 1=SIGHUP, 2=SIGINT).
Or am I using ssh and/or netcat in a way it was not designed for? Any ideas how to properly get rid of this error?
You can either keep doing what you're doing (without the "exec", the ssh command has a parent shell, and the shell catches the SIGHUP but it does keep the shell process around for the duration of the connection) or tell ssh to be quiet and not report the signal (change "exec ssh foo" to "exec ssh -q foo").
-- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.