Sending Signal to remote process

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Wed Jan 24 20:32:49 AEDT 2018


On Wed, 24 Jan 2018, Thomas Güttler wrote:
> Am 23.01.2018 um 18:24 schrieb Cristian Ionescu-Idbohrn:
> > On Tue, 23 Jan 2018, Thomas Güttler wrote:
> > > 
> > > I want ssh to forward the SIGTERM signal to the remote command.
> > > 
> > > Example:
> > >     ssh root at localhost /root/print-signal.py
> > > 
> > > Get PID of ssh:
> > >      ps aux| grep print-signal
> > > 
> > > Kill the matching ssh process:
> > >      kill pid-of-ssh
> > 
> > You might be able to get around it by running:
> > 
> > $ ssh root at localhost '/root/print-signal.py </dev/null >/dev/null
> > 2>/dev/null'
> > 
> > I recall I used that in another context.  I also recall the `ssh'
> > command not returning the prompt.  Does that allso happen to you?
> 
> I tried this, and it did not help. I ask myself how this could help,
> since the ssh does not forward the signal. Do you think closing
> the streams make a difference?

In my case, it did.  I guess I'm not fully understanding your 
scenario.


Cheers,

-- 
Cristian



More information about the openssh-unix-dev mailing list