[plug] sshd help (take2) [UNCLASSIFIED]

Clark Julian Julian.Clark at cdpp.gov.au
Tue Feb 8 13:57:20 WST 2005


 

> -----Original Message-----
> From: plug-bounces at plug.org.au 
> [mailto:plug-bounces at plug.org.au] On Behalf Of Denis Brown
> Sent: Tuesday, 8 February 2005 12:24 PM
> To: plug at plug.org.au; plug at plug.org.au
> Subject: Re: [plug] sshd help (take2)
> 
> Thanks, Craig and Tim.
> 
> Tim: no chance yet to check the aspects you mentioned.
> Craig:...
> 
> At 11:33 AM 8/02/2005, Craig Ringer wrote:
> >On Mon, 2005-02-07 at 21:29 +0800, Denis Brown wrote:
> > > Sigh,
> > >
> > > Not quite as simple as I thought!   Okay, the situation 
> appears to be that
> 
> <snip>
> 
> >That shouldn't happen. You can have many connections from 
> the same user,
> >and when the ssh client is disconnected due to network 
> failure the sshd
> >tends to hang around for a *long* time without impairing logins from
> >others.
> 
> I thought as much!   In fact many times I have ssh'd into a 
> machine, using 
> the same user credentials either from additional instances of 
> PuTTY on one 
> machine, or from several individual machines.
> 
> >It sounds to me more like the "master" sshd whose job it is 
> to spawn an
> >sshd for each new connection might be having problems.
> 
> Nod.
> 
> >ensure no sshd processes are still running (kill any that 
> are). Then, as
> >root, run:
> >
> >sshd -d
> >
> >and connect to the server. It should log (and IIRC output) a lot of
> >information. Examining that may give you some clues.
> 
> Thanks.  As above to Tim's suggestions, no physical machine 
> in front of me 
> now.   But what you say gels quite nicely.   Consider that 
> using the init.d 
> scripts to do the sshd start/stop/restart produces some interesting 
> effects.   Namely that if the sshd process is still "healthy" 
> then I can 
> start, stop, restart it to my heart's content.   If the 
> "master" sshd as 
> you put it becomes unhealthy though - and maybe forgets to 
> fork off child 
> processes, or kill them - then attempting a sshd stop results 
> in red !! 
> marks on the resulting output line (on the root console) and 
> subsequent 
> attempts to start or restart it brings forth the message that 
> the sshd is 
> already running.   Having a look at the sshd script (in 
> /etc/init.d) shows 
> that it is trying to identify the sshd (master) process 
> through its entry 
> in /var/run/sshd.pid, if that file in fact exists.
> 
> In the face or the error messages mentioned above, a ps -A 
> shows no such 
> sshd process running and /var/run does not contain an shd.pid file 
> either!   Somehow or other the process "engine" has gone off 
> the rails at 
> least as far as sshd is concerned.   The init.d script in 
> fact uses the 
> start-stop-daemon which, according to text strings within it 
> hails from 
> Debian so I'm a little loathe to blame it :-)
> 
> It was on the basis of the observed bizarre behavior with the 
> "already 
> running" but invisible sshd that I unemerged and re-emerged 
> sshd last thing 
> last night.  But to no avail.   I'll throw this one at the 
> Gentoo forum for 
> comment.   Perhaps I should add that this is a fresh 
> installation and I am 
> reasonably sure that I have a valid kernel - no silly 
> mistakes in config 
> and that otherwise everything else on the system seems fine.
> 
> At this point I do not know if I am facing two probems or 
> just one... if 
> one then the misbehaving master sshd would be the problem.   
> If two then 
> I'd pitch for some PAM-related mischief or misconfiguration.  
>  Driving home 
> it occurred to me the significance of the [net] and [pam] 
> sub-processes...    When an incoming conection attempt is 
> made there would 
> logically be a [priv] part, then a [net] part while network-related 
> activities took place.   This would be succeeded by a [pam] part for 
> authentication.   Once authentication was achieved that process (sub 
> process?) could die off, then the [net] sub process, leaving only the 
> [priv] and userland parts intact until either logout or connection 
> dropout.   Corrections to the above most gratefully recvd!
> 
> Thanks,
> Denis
> 
> 
> 
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://www.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au
> 
> 

Hi Denis,

I've been using sshd under gentoo without any difficulties.
It seems strange to me, because mine worked pretty much straight out of
the box.

Maybe there's a problem with your sshd configuration file 
Perhaps you could post the contents of /etc/conf.d/sshd

I'll copy my sshd conf file and send it through tomorrow if you'd like?

I can't send it now, cause I'm at work. :-(


Cheers,

Julian Clark


**********************************************************************
The information contained in this message and in any attachments is privileged and confidential and intended only for the use of the addressee. You should not read, copy, use or disclose this information without authorisation. If you are not the intended recipient of this message, please e-mail the sender immediately and delete this message. Any unauthorised dissemination, disclosure, copying or use of the contents of this message is prohibited and may result in legal action.
**********************************************************************




More information about the plug mailing list