cygwin ssh gives "Killed by signal 1" on exit

Rop picture Rop · Sep 28, 2012 · Viewed 20.1k times · Source

After using cygwin's ssh to login from windows to linux-hosts, when exiting the remote shell, I always get the annoying msg:

"Killed by signal 1"

I googled, and realize its harmless, but still annoying... Some suggested you can get rid of the message by using

$ ssh -q ...

But that has no effect on any of the machines I've tried.

Anyone knows a working solution to get rid of this msg?

Answer

Irfy picture Irfy · Mar 9, 2014

This happens when you proxy your ssh session through another host. Example .ssh/config file:

# machine with open SSH port
Host proxy
HostName foo.com

# machine accessible only from the above machine
Host target
HostName 192.168.0.12
ProxyCommand ssh proxy nc %h %p

When you exit from an ssh target, the ssh in ProxyCommand will cause the output. If you add the -q there, it will be suppressed:

ProxyCommand ssh -q proxy nc %h %p

You may be surprised that this output has nothing to do with Cygwin -- it happens on Linux as well.