Hi, If anyone has managed to get sshd to run as a subsystem in the System Resource Controller under AIX 4.3.3 (a la mkssys), then please let me know how you did it... I can mkssys and startsrc it, but it dies immediately, leaving a child sshd running with another PID than startsrc reported, and lssrc reports sshd inoperative. Is sshd a process that should stay in foreground, not forking? Or does it fork every time to service a connection (excuse my ignorance)? Douglas Manton, I read your post of 2001-03-16 on this (Re: SIGHUP/av[0] restart failure (AIX)). Any clues? What am I forgetting? Thanx,
At 01:36 PM 5/9/2001, you wrote: >Hi, > >If anyone has managed to get sshd to run as a subsystem in the System >Resource Controller under AIX 4.3.3 (a la mkssys), then please let me know >how you did it... This works for me, at least on AIX 4.3.2, I don't imagine it would be much different for 4.3.3. mkssys -s sshd -p /usr/local/sbin/sshd -a '-D ' -u 0 -S -n 15 -f 9 -R -G local Note the -D switch I pass to sshd. Jason Fortezzo fortezzo at directlink.net PGP Key: http://mysite.directlink.net/fortezzo/pgpkey --- If you have any trouble sounding condescending, find a Unix user to show you how it's done. --Scott Adams
> mkssys -s sshd -p /usr/local/sbin/sshd -a '-D ' -u 0 -S -n 15 -f 9 -R -Glocal> Note the -D switch I pass to sshd.Yup. Previously I had patched the sshd source to prevent it from forking (a prerequisite of the AIX SRC). I also wanted the functionality to log if sshd had fallen over. Using the "-R" switch on mkssys restarts it, but unless you monitor the PID then you have no record. I have managed this using the "mknotify" method. You simply run the above mkssys without the "-R" and then: mknotify -n sshd -m /usr/bin/sysfailed /usr/bin/sysfailed is a script along the lines of: #!/bin/sh logger -pdaemon.err -t srcmstr "$1 has fallen over and is being restarted" startsrc -s $1 CODE=$? if [ "$CODE" != "0" ] then logger -pdaemon.crit -t srcmstr "$1 could not be restarted!" stopsrc -s $1 else logger -pdaemon.err -t srcmstr "$1 restarted" fi This logs the failure and restarts sshd. Now to convince the AIX developers to send a "kill -HUP" to subsystems controlled through signals using the refresh command! Best wishes, -------------------------------------------------------- Doug Manton, AT&T EMEA Commercial Security Solutions E: demanton at att.com -------------------------------------------------------- "If privacy is outlawed, only outlaws will have privacy"