tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY2: SSH/Startup
@ 2001-03-02 19:20 bac
  0 siblings, 0 replies; only message in thread
From: bac @ 2001-03-02 19:20 UTC (permalink / raw)
  To: tru64-unix-managers

Hi Robert

This doesnt seem to work..I did what you said.

any ideas? i would really prefer to start sshd through
inetd.conf.

thanks
ashok
--- Robert Mulley <Robert.Mulley@unilever.com> wrote:
> Hello,
> 
> Replying to summaries again, I should really stop
> that but I can't help
> myself. We run ssh out of inetd. I much prefer it
> there as you don't have
> to have any sort of start/stop scripts and it only
> runs when somebody
> connects.
> 
> You'll need to add a line to /etc/services
> ssh2		22/tcp
> and you'll need to add a line to /etc/inetd.conf
> ssh2    stream   tcp     nowait    root   
> /usr/local/bin/sshd2  sshd2 -i
> 
> The "-i" tells sshd that it's running out of inetd.
> You of course then
> have to re-init inetd by
> kill -HUP <Process ID of inetd>
> 
> Robert Mulley
> Unix admin
> 
> -----Original Message-----
> From:	bac [SMTP:bac20000@yahoo.com]
> Sent:	02 March 2001 00:28
> To:	Paul A Sand; tru64-unix-managers@ornl.gov
> Subject:	SUMMARY: SSH/Startup
> 
> Thanks to:
> 
>  Ian Mortimer   
>  Gregory Patrick Rudd   
>  Paul A Sand   
> 
> The following script by Paul A Sand works perfectly:
> 
> > 
> > I don't know about `best', but we have this in
> > /sbin/init.d/sshd:
> > 
> >     #!/sbin/sh
> >     PATH=/sbin:/usr/sbin:/usr/bin
> >     export PATH
> > 
> >     case "$1" in
> >     'start')
> > 	set `who -r`
> > 	if [ $9 = "S" ]; then
> > 	    if /usr/local/sbin/sshd; then
> > 		echo "sshd started"
> > 	    fi
> > 	fi
> > 	;;
> >     'stop')
> > 	/bin/kill `cat /var/run/sshd.pid`
> > 	;;
> >     *)
> > 	echo "usage: $0 {start|stop}"
> > 	;;
> >     esac 
> > 
> > And /sbin/rc3.d/S93sshd is a symlink to this. Hope
> > this helps.
> 
> Ian also gave the following suggestion, which I
> didn't
> get a chance to try:
> 
> Copy the script below to /sbin/init.d/sshd. Do:
> 
>    /sbin/init.d/sshd start
>    /sbin/init.d/sshd status
>    /sbin/init.d/sshd stop
>    /sbin/init.d/sshd status
> 
> to confirm that the script works.  Then do:
> 
>    chmod 750 /sbin/init.d/sshd
>    cd /sbin/rc3.d
>    ln -s ../init.d/sshd S97sshd    # 97 is arbitrary
> -
> choose your own 
> order
>    cd /sbin/rc2.d
>    ln -s ../init.d/sshd K97sshd    # 97 is arbitrary
> -
> choose your own 
> order
>    cd /sbin/rc0.d
>    ln -s ../init.d/sshd K97sshd    # 97 is arbitrary
> -
> choose your own 
> order
> 
> It should then start in level 3 and shut down if you
> switch to 
> level 2 or 0.
> 
> 
> Ian
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail. 
> http://personal.mail.yahoo.com/
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-03-02 19:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-02 19:20 SUMMARY2: SSH/Startup bac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox