Subject: Re: Problem with ssh commands from cron
To: Christoph Kaegi <kgc@zhwin.ch>
From: Quentin Garnier <netbsd@quatriemek.com>
List: netbsd-users
Date: 11/25/2003 00:32:06
Le Mon, 24 Nov 2003 13:09:37 +0100
Christoph Kaegi a ecrit :
> I'am restarting named on a remote system by connecting via 
> ssh and authenticating through a certain private key.
> The authorized_keys file on the remote host is setup as to 
> call '/etc/rc.d/named restart' every time this key authenticates.
> 
> The call looks like this:
> 
> # ssh -n -t -i /root/.ssh/restartDNSid remotesystem
> 
> This works, when called directly from the console. When
> called from cron, named gets restarted, but ssh never
> returns.
> 
> Does anyone have a clue, what the problem could be?
> 
> I already tried with/without -t and -n, but the behaviour 
> was the same.
> I also checked the openssh FAQ but don't think that 
> "3.10 - Hangs when exiting ssh" applies.

Have you tried redirecting *input* from /dev/null?

-- 
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"Feels like I'm fiddling while Rome is burning down.
Should I lay my fiddle down and take a rifle from the ground ?"
Leigh Nash/Sixpence None The Richer, Paralyzed, Divine Discontents, 2002.