glfs/server/other/openssh/openssh-config.xml
Larry Lawrence 5842069d2c update to openssh-3.6.1p2
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@927 af4574ff-66df-0310-9fd7-8a98e5e911e0
2003-07-02 02:08:12 +00:00

82 lines
2.3 KiB
XML

<sect2>
<title>Configuring <application>OpenSSH</application></title>
<sect3><title>Config files</title>
<para><filename>/etc/ssh/ssh_config</filename>,
<filename>/etc/ssh/sshd_config </filename></para>
<para>There are no required changes in either of these files. However
you may wish to view them to make changes for appropriate security to
your system. Configuration information can be found in the man pages for sshd, ssh and ssh-agent</para>
</sect3>
<sect3><title>sshd init.d script</title>
<para>Note that you only want to start the sshd server if you want to be
able to ssh <emphasis>into</emphasis> your machine. The ssh client
doesn't need this script to be used. Having said that, if you want to
run the ssh daemon, the sshd init.d script can be created using the following
commands:</para>
<para><screen><userinput><command>cat &gt; /etc/rc.d/init.d/sshd &lt;&lt; "EOF"</command>
#!/bin/sh
# Begin $rc_base/init.d/sshd
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
source /etc/sysconfig/rc
source $rc_functions
case "$1" in
start)
echo "Starting SSH Server..."
loadproc /usr/sbin/sshd
;;
stop)
echo "Stopping SSH Server..."
killproc /usr/sbin/sshd
;;
reload)
echo "Reloading SSH Server..."
reloadproc /usr/sbin/sshd
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/sshd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/sshd
<command>EOF
chmod 755 /etc/rc.d/init.d/sshd</command></userinput></screen></para>
<para>Create the symbolic links to this file in the relevant <filename
class="directory">rc.d</filename> directories with the following commands:
<screen><userinput><command>cd /etc/rc.d/init.d &amp;&amp;
ln -sf ../init.d/sshd ../rc0.d/K30sshd &amp;&amp;
ln -sf ../init.d/sshd ../rc1.d/K30sshd &amp;&amp;
ln -sf ../init.d/sshd ../rc2.d/K30sshd &amp;&amp;
ln -sf ../init.d/sshd ../rc3.d/S30sshd &amp;&amp;
ln -sf ../init.d/sshd ../rc4.d/S30sshd &amp;&amp;
ln -sf ../init.d/sshd ../rc5.d/S30sshd &amp;&amp;
ln -sf ../init.d/sshd ../rc6.d/K30sshd</command></userinput></screen></para>
</sect3>
</sect2>