Re: ssh Frage

From: Oliver Fromme <olli(at)lurza.secnetix.de>
Date: Tue, 16 Mar 2004 18:04:46 +0100 (CET)

Manfred Lotz <manfred.lotz(at)web.de> wrote:
> Ich habe ein script welches mittels ssh auf einem anderen System ein
> Script aufruft, also etwa so:
>
> ssh user(at)fremdes.system 'somescript.sh &'
>
> somescript.sh ist ein Langläufer, daher &.

Das bringt nichts, da ssh die Verbindung solange offenhal-
ten muß, wie noch Filedescriptoren existieren.

> Allerdings hängt dann mein ssh comand bis somescript.sh auf dem
> anderen System fertig ist.

Ja.

> Habe ich irgendeine Chance dies zu verhindern? Versuche mit nohup
> haben nichts gefruchtet.

nohup ändert auch nichts daran. Versuch's mal so:

$ ssh ... 'somescript.sh </dev/null >logfile 2>&1 &'

oder:

$ ssh ... 'somescript.sh </dev/null 2>&1 | mail -s "Log" dich(at)domain &'

oder Du kannst es natürlich komplett nach /dev/null umlei-
ten, wenn Dich nicht interessiert, was das Skript ausgibt.
Ist aber eigentlich immer besser, wenn man nachgucken kann,
falls was schiefgeht, bzw. daß man überhaupt merkt, wenn
etwas schiefgeht.

Gruß
   Olli

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Tue 16 Mar 2004 - 18:05:23 CET

search this site