SSHD startup script

SSHD startup script

Post by Marc » Wed, 12 Dec 2001 04:47:21



Hi there,

Is there anyone who already created a startup script for SSHD to put in
/etc/init.d ? If yes could I have it ?

Thanks

Regards

 
 
 

SSHD startup script

Post by EB » Wed, 12 Dec 2001 06:39:58


*** post for FREE via your newsreader at post.newsfeeds.com ***



Quote:> Hi there,

> Is there anyone who already created a startup script for SSHD to put in
> /etc/init.d ? If yes could I have it ?

> Thanks

> Regards

#!/sbin/sh

case "$1" in
'start')
        /usr/local/sbin/sshd
        ;;

'stop')
        /usr/bin/pkill -x -u 0 sshd
        ;;

*)
        echo "Usage: $0 { start | stop }"
        exit 1
        ;;
esac
exit 0

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 90,000 Newsgroups - 16 Different Servers! =-----

 
 
 

SSHD startup script

Post by Jonas Bygd » Wed, 12 Dec 2001 06:27:04


Quote:>>>>> "Marc" == syn uw <Marc> writes:

  Marc> Hi there,

  Marc> Is there anyone who already created a startup script for SSHD
  Marc> to put in /etc/init.d ? If yes could I have it ?

Quote:>----------------script begin--------------------<

#!/bin/sh

case $1 in
'start')
        if [ -f /usr/local/sbin/sshd ]; then
                echo "starting sshd..."
                /usr/local/sbin/sshd
        fi

        ;;
'stop')
        if [ -f /etc/sshd.pid ]; then
                echo "stopping sshd..."
                kill -TERM `cat /etc/sshd.pid`
        fi
        ;;
*)
        echo "usage: $0 {start|stop}"
        ;;
esac

Quote:>-----------------script end---------------------<

--

 
 
 

SSHD startup script

Post by Dave Uhrin » Wed, 12 Dec 2001 09:56:29



>>>>>> "Marc" == syn uw <Marc> writes:

>   Marc> Hi there,

>   Marc> Is there anyone who already created a startup script for SSHD
>   Marc> to put in /etc/init.d ? If yes could I have it ?

>>----------------script begin--------------------<
> #!/bin/sh

> case $1 in
> 'start')
>         if [ -f /usr/local/sbin/sshd ]; then
>                 echo "starting sshd..."
>                 /usr/local/sbin/sshd
>         fi

>         ;;
> 'stop')
>         if [ -f /etc/sshd.pid ]; then
>                 echo "stopping sshd..."
>                 kill -TERM `cat /etc/sshd.pid`
>         fi
>         ;;
> *)
>         echo "usage: $0 {start|stop}"
>         ;;
> esac
>>-----------------script end---------------------<

Or you could just use the one which comes with the source package in
contrib/solaris.
 
 
 

SSHD startup script

Post by Thierry Chenu » Fri, 14 Dec 2001 04:41:49



> Hi there,

> Is there anyone who already created a startup script for SSHD to put in
> /etc/init.d ? If yes could I have it ?

> Thanks

> Regards

There is a nice web page providing by Sun, dealing with the installion
of OpenSSH on a Solaris platform. You will be able to find a couple
script available for download, one on them is the init script for sshd.

The link is http://www.sun.com/blueprints/#opensshsolaris

--
Thierry Chenus

 
 
 

SSHD startup script

Post by Roger Marqui » Fri, 14 Dec 2001 13:54:58



>Is there anyone who already created a startup script for SSHD to put in
>/etc/init.d ? If yes could I have it ?

If you're already running inetd it doesn't make sense to run sshd as a
stand-alone daemon unless you're connecting to it very frequently or
running it on a very slow machine.  In those cases key generation time
may make it worthwhile to run stand-alone.  Otherwise, to start ssh
from inetd:

 #grep ssh /etc/inetd.conf
 ssh stream tcp nowait root /usr/local/openssh/bin/sshd sshd -i

 #grep ssh /etc/services
 ssh 22/tcp

--
Roger Marquis
Roble Systems Consulting
http://www.roble.com/