cygwin ssh gives "Killed by signal 1" on exit

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.


Adding following line to your ~/.ssh/config file can squash that message.

Update: QUIET must be all CAPS & must added for each host in your config.

LogLevel QUIET

Added in first line will squash the message globally. Will only take effect for the specific hosts if it's placed under Host.


I'm adding a new answer because I have a new solution under different circumstances.

When using the modern ProxyJump directive, there is no place to put the -q, as with ProxyCommand:

Host target
  ProxyJump proxy

Instead of switching back to the more manual jump definition with ProxyCommand, the solution with ProxyJump is to add LogLevel QUIET to a Host proxy definition:

Host target
  ProxyJump proxy
Host proxy
  LogLevel QUIET

which will have the same effect as the -q in ProxyCommand's ssh -q proxy ....