glfs/server/other/openssh/openssh-config.xml

86 lines
2.5 KiB
XML
Raw Normal View History

<sect2>
<title>Configuring <application>Open<acronym>SSH</acronym></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
<command>sshd</command>, <command>ssh</command> and <command>ssh-agent
</command></para>
</sect3>
<sect3><title>sshd init.d script</title>
<para>Note that you only want to start the <command>sshd</command> server if
you want to be able to <command>ssh</command> <emphasis>into</emphasis> your
machine. The <command>ssh</command> client doesn't need this script to be
used. Having said that, if you want to run the <command>ssh</command> daemon,
the <application>Open<acronym>SSH</acronym></application> daemon init.d script can be created using the following
commands:</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
. /etc/sysconfig/rc
. $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>Create the symbolic links to this file in the relevant <filename
class="directory">rc.d</filename> directories with the following
commands:</para>
<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>
</sect3>
</sect2>