Re: Starting daemon using ssh
From: Kieran.Tully AT acm.org (kieran.tully_at_gmail.com)
Date: Thu, 4 Nov 2004 11:28:06 +0000 To: "firstname.lastname@example.org" <email@example.com>
On Tue, 2 Nov 2004 08:19:39 +0100, Binninger, Martin
> While trying, to start a daemon on a remote machine using ssh, the client
> doesn't return to the local prompt after performing the start-up of the
> daemon. I'm using openssh 3.7.1p2, ssh-version 2.0 on Tru64 as the os.
> The command, I'm executing is the following:
> ssh -i <KEY> <USER>@<SERVER> "/usr/local/bin/sudo /<PATH>/daemon start &&
> echo 'done' "
'done' is being printed, so the daemon is returning control to the shell.
A process on the remote machine may have a lock on the ssh session.
Often this is stdin on the daemon. You could verify this by listing the
file descriptors for the daemon (not sure how to do that on Tru64.).
ssh -i <KEY> <USER>@<SERVER> "<REMOTE CMD> </dev/null >/dev/null 2>/dev/null"
If you start multiple background processes from a single ssh, redirect
-- Kieran Tully, Software Developer and Tenor Reply to Kieran.Tully AT acm.org http://kieran.tul.ly http://www.cs.tcd.ie/~tullyka