Re: ssh session does not end after executing remote command
- From: Bart Heinsius <bheinsius@xxxxxxxxx>
- Date: Thu, 23 Nov 2006 23:18:36 +0100
That did the trick!
I now do:
ssh user@xxxxxxxxxxxx "sudo -u zimbra /opt/zimbra/bin/zmcontrol start < /dev/null "
and it works.
thanks a lot.
regards Bart.
Richard E. Silverman wrote:
."BH" == Bart Heinsius <bheinsius@xxxxxxxxx> writes:
BH> Hi, After remotely stopping my email server and backing it up
BH> using rsnapshot, I want to restart my email server. For that I
BH> created the following shell script:
BH> #!/bin/sh
BH> # Start Zimbra ssh user@xxxxxxxxxxxx "sudo -u zimbra
BH> /opt/zimbra/bin/zmcontrol start"
BH> ssh logs in automatically through rsa authentication.
BH> The "zmcontrol start" command gets executed remotely and completes
BH> successfully (rc=0). The problem is that the ssh session doesn't
BH> end.
BH> Strange thing is that the same script executing "zmcontrol stop"
BH> does finish normally.
BH> I read the ssh documentation and it says that the ssh session will
BH> end if all X11 and initiated tcp/ip sessions have ended. My guess
BH> is that the zmcontrol program initiates a few tcp/ip sessions but
BH> doesn't close them properly.
BH> Is there anyway to force ssh to terminate the session after the
BH> zmcontrol program has ended?
BH> kind regards Bart.
Perhaps: http://www.snailbook.com/faq/background-jobs.auto.html
- References:
- ssh session does not end after executing remote command
- From: Bart Heinsius
- Re: ssh session does not end after executing remote command
- From: Richard E. Silverman
- ssh session does not end after executing remote command
- Prev by Date: Re: X11-forwarding works with bash(linux) ut not with Putty(windows)
- Next by Date: SSH Tectia Client, mouse e Linux terminals
- Previous by thread: Re: ssh session does not end after executing remote command
- Next by thread: SSH Tectia Client, mouse e Linux terminals
- Index(es):
Relevant Pages
|
|