[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wierd monit/sshd interaction
From: |
Jan-Henrik Haukeland |
Subject: |
Re: Wierd monit/sshd interaction |
Date: |
29 Jul 2002 00:23:34 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service) |
>From the trace file you can see that the script /etc/init.d/ssh calls
the actually binary wrongly:
execve("/usr/sbin/sshd", ["/usr/sbin/sshd", "-?"], [/* 2 vars */]) = 0
with the result later down:
[pid 23315] write(2, "sshd: illegal option -- ?\n", 26) = 26
I have seen this before and usually it means that the environment is
not setup properly. As you can see from the FAQ, monit purges the
environment and sets a very spartan PATH (for security reasons).
I suggest that you set the PATH you use when you start sshd from the
command line and inserts it into the script /etc/init.d/ssh and try
again. Let us know if this helps.
Mark Ferlatte <address@hidden> writes:
> On Thu, Jul 25, 2002 at 10:52:56PM +0200, Martin Pala wrote (1.00):
> > it is strange - maybe the problem could be in sshd. Can you attach output
> > from monits strace as described in FAQ or strace of sshd in the time of
> > start as outlined bellow?
>
> I've narrowed the problem down even more... if the user has ForwardAgent
> no, then it works fine. I've attached an strace of monit restarting
> sshd, and me attempting to connect (since strace appears to trace
> children, no need for the second trace). sshd's PID is 23318, and you
> can see that it fails to bind to /tmp/ssh-XXJ6demX/agent.23332, which
> causes the (admittedly very poor) error message to be returned to the
> client.
>
> What it doesn't explain, however, is why this happens only when monit
> starts sshd...
>
> Trace attached.
>
> M
>
>
--
Jan-Henrik Haukeland