From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <98356087312267.tru64-unix-managers.marc@archive.invalid> From: bac Date: Fri, 02 Mar 2001 19:20:29 +0000 To: tru64-unix-managers Subject: SUMMARY2: SSH/Startup X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=98356087312267 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 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 > > 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/