<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Startup/Shutdown script for OpenSSH in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-openssh/m-p/2736265#M66581</link>
    <description>Thanks for all of your assistance, OpenSSH is now working for me over reboot.</description>
    <pubDate>Mon, 03 Jun 2002 17:03:55 GMT</pubDate>
    <dc:creator>Kent Pirkle</dc:creator>
    <dc:date>2002-06-03T17:03:55Z</dc:date>
    <item>
      <title>Startup/Shutdown script for OpenSSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-openssh/m-p/2736261#M66577</link>
      <description>Does anyone have a good startup/shutdown script for OpenSSH?&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Mon, 03 Jun 2002 12:49:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-openssh/m-p/2736261#M66577</guid>
      <dc:creator>Kent Pirkle</dc:creator>
      <dc:date>2002-06-03T12:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Startup/Shutdown script for OpenSSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-openssh/m-p/2736262#M66578</link>
      <description>Check this thread and Michael's answer:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x627e42308663d611abdb0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x627e42308663d611abdb0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Jun 2002 12:51:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-openssh/m-p/2736262#M66578</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2002-06-03T12:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Startup/Shutdown script for OpenSSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-openssh/m-p/2736263#M66579</link>
      <description>Here's what I use.&lt;BR /&gt;&lt;BR /&gt;PATH=/usr/sbin:/usr/bin:/sbin&lt;BR /&gt;export PATH&lt;BR /&gt;&lt;BR /&gt;# NOTE: If your script executes in run state 0 or state 1, then /usr might&lt;BR /&gt;#       not be available.  Do not attempt to access commands or files in&lt;BR /&gt;#       /usr unless your script executes in run state 2 or greater.  Other&lt;BR /&gt;#       file systems typically not mounted until run state 2 include /var&lt;BR /&gt;#       and /opt.&lt;BR /&gt;&lt;BR /&gt;rval=0&lt;BR /&gt;&lt;BR /&gt;# Check the exit value of a command run by this script.  If non-zero, the&lt;BR /&gt;# exit code is echoed to the log file and the return value of this script&lt;BR /&gt;# is set to indicate failure.&lt;BR /&gt;&lt;BR /&gt;set_return() {&lt;BR /&gt;        x=$?&lt;BR /&gt;        if [ $x -ne 0 ]; then&lt;BR /&gt;                echo "EXIT CODE: $x"&lt;BR /&gt;                rval=1  # script FAILed&lt;BR /&gt;        fi&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;case $1 in&lt;BR /&gt;'start_msg')&lt;BR /&gt;        # Emit a _short_ message relating to running this script with&lt;BR /&gt;        # the "start" argument; this message appears as part of the checklist.&lt;BR /&gt;        # the following line was the standard line. replaced by the next line.&lt;BR /&gt;        # echo "Starting the &lt;SPECIFIC&gt; subsystem"&lt;BR /&gt;        echo "Starting the Secure Shell Daemon"&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;'stop_msg')&lt;BR /&gt;        # Emit a _short_ message relating to running this script with&lt;BR /&gt;        # the "stop" argument; this message appears as part of the checklist.&lt;BR /&gt;        # echo "Stopping the &lt;SPECIFIC&gt; subsystem"&lt;BR /&gt;        echo "Stopping the Secure Shell Daemon"&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;'start')&lt;BR /&gt;&lt;BR /&gt;        # source the system configuration variables&lt;BR /&gt;if [ -f /etc/rc.config.d/sshd ] ; then&lt;BR /&gt;                . /etc/rc.config.d/sshd&lt;BR /&gt;        else&lt;BR /&gt;                echo "ERROR: /etc/rc.config.d/sshd defaults file MISSING"&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;        # Check to see if this script is allowed to run...&lt;BR /&gt;        if [ $SSHD != 1 ]; then&lt;BR /&gt;                rval=2&lt;BR /&gt;        else&lt;BR /&gt;           echo "Starting Secure Shell Daemon"&lt;BR /&gt;           /opt/openssh2/sbin/sshd&lt;BR /&gt;           set_return&lt;BR /&gt;        fi&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;'stop')&lt;BR /&gt;        # source the system configuration variables&lt;BR /&gt;        if [ -f /etc/rc.config.d/sshd ] ; then&lt;BR /&gt;                . /etc/rc.config.d/sshd&lt;BR /&gt;        else&lt;BR /&gt;                echo "ERROR: /etc/rc.config.d/sshd defaults file MISSING"&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;        # Check to see if this script is allowed to run...&lt;BR /&gt;        if [ $SSHD != 1 ]; then&lt;BR /&gt;                rval=2&lt;BR /&gt;        else&lt;BR /&gt;           echo "Stopping Secure Shell Daemon"&lt;BR /&gt;           KSSH=`cat /var/run/sshd.pid`&lt;BR /&gt;           kill -9 $KSSH&lt;BR /&gt;           set_return&lt;BR /&gt;        :&lt;BR /&gt;        # Execute the commands to stop your subsystem&lt;BR /&gt;&lt;BR /&gt;        fi&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;*)&lt;BR /&gt;        echo "usage: $0 {start|stop}"&lt;BR /&gt;        rval=1&lt;BR /&gt;        ;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;exit $rval&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;GL,&lt;BR /&gt;C&lt;/SPECIFIC&gt;&lt;/SPECIFIC&gt;</description>
      <pubDate>Mon, 03 Jun 2002 13:20:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-openssh/m-p/2736263#M66579</guid>
      <dc:creator>Craig Rants</dc:creator>
      <dc:date>2002-06-03T13:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Startup/Shutdown script for OpenSSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-openssh/m-p/2736264#M66580</link>
      <description>Hi Kent,&lt;BR /&gt;&lt;BR /&gt;Copy the attached file to /sbin/init.d/sshd (based on HP's template for rc files /sbin/init.d/template):&lt;BR /&gt;&lt;BR /&gt;Create /etc/rc.config.d/sshd with the following contents:&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;#&lt;BR /&gt;# OpenSSH daemon configuration&lt;BR /&gt;#&lt;BR /&gt;# SSH_ENABLED:      Set to 1 to enable starting of OpenSSH daemon&lt;BR /&gt;#&lt;BR /&gt;SSH_ENABLED=1&lt;BR /&gt;&lt;BR /&gt;Create symlinks in the rc directories for starting and stopping sshd:&lt;BR /&gt;ln -s /sbin/init.d/sshd /sbin/rc3.d/S050sshd&lt;BR /&gt;ln -s /sbin/init.d/sshd /sbin/rc2.d/K950sshd&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Mon, 03 Jun 2002 13:28:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-openssh/m-p/2736264#M66580</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-06-03T13:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Startup/Shutdown script for OpenSSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-openssh/m-p/2736265#M66581</link>
      <description>Thanks for all of your assistance, OpenSSH is now working for me over reboot.</description>
      <pubDate>Mon, 03 Jun 2002 17:03:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-openssh/m-p/2736265#M66581</guid>
      <dc:creator>Kent Pirkle</dc:creator>
      <dc:date>2002-06-03T17:03:55Z</dc:date>
    </item>
  </channel>
</rss>

