Subject: Problem with ssh commands from cron
To: None <netbsd-users@netbsd.org>
From: Christoph Kaegi <kgc@zhwin.ch>
List: netbsd-users
Date: 11/24/2003 13:09:37
Dear list

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.

Thanks
Chris

-- 
----------------------------------------------------------------------
Christoph Kaegi                                           kgc@zhwin.ch
----------------------------------------------------------------------