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?
If you enable connection sharing with the ControlMaster directive you can share a single connection when proxying sessions through another host. You can then set the ControlPersist directive to 1 second which will avoid the 'killed by signal 1' error by delaying the termination of the shared connection.
Add the following to your ~/.ssh/config
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.
Added in first line will squash the message globally. Will only take effect for the specific hosts if it's placed under
Host
.Perhaps, you might like PuTTY as an alternative. I don't think it gives that error AND it allows you to do things like save connection info as well as other niceties.
Though I haven't tried it, you might also be able to redirect sterr (which is the stream I believe that message would be sent to) to /dev/null (effectively, the bitbucket or bottomless void where things go to die). You could do possibly do something like:
ssh user@host 2>/dev/null
This happens when you proxy your ssh session through another host. Example
.ssh/config
file:When you exit from an
ssh target
, thessh
inProxyCommand
will cause the output. If you add the-q
there, it will be suppressed:You may be surprised that this output has nothing to do with Cygwin -- it happens on Linux as well.
In a script bash, to get rid of this message, add the following at the top:
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 withProxyCommand
:Instead of switching back to the more manual jump definition with
ProxyCommand
, the solution withProxyJump
is to addLogLevel QUIET
to aHost proxy
definition:which will have the same effect as the
-q
inProxyCommand
'sssh -q proxy ...
.