[0931098] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY openssh-download-http "http://sunsite.ualberta.ca/pub/OpenBSD/OpenSSH/portable/openssh-&openssh-version;.tar.gz">
|
---|
| 8 | <!ENTITY openssh-download-ftp "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-&openssh-version;.tar.gz">
|
---|
[0fbab6b] | 9 | <!ENTITY openssh-md5sum "8e1774d0b52aff08f817f3987442a16e">
|
---|
[df7d6378] | 10 | <!ENTITY openssh-size "854 KB">
|
---|
| 11 | <!ENTITY openssh-buildsize "13.3 MB">
|
---|
| 12 | <!ENTITY openssh-time "0.40 SBU">
|
---|
[0931098] | 13 | ]>
|
---|
| 14 |
|
---|
[1708d1e9] | 15 | <sect1 id="openssh" xreflabel="OpenSSH-&openssh-version;">
|
---|
[a0f03b0] | 16 | <sect1info>
|
---|
[5cd0959d] | 17 | <othername>$LastChangedBy$</othername>
|
---|
| 18 | <date>$Date$</date>
|
---|
[a0f03b0] | 19 | </sect1info>
|
---|
[00bb024c] | 20 | <?dbhtml filename="openssh.html"?>
|
---|
[40330fcd] | 21 | <title>Open<acronym>SSH</acronym>-&openssh-version;</title>
|
---|
[f45b1953] | 22 |
|
---|
[0931098] | 23 | <sect2>
|
---|
[df7d6378] | 24 | <title>Introduction to
|
---|
| 25 | <application>Open<acronym>SSH</acronym></application></title>
|
---|
[0931098] | 26 |
|
---|
| 27 | <para>The <application>Open<acronym>SSH</acronym></application> package
|
---|
[df7d6378] | 28 | contains <command>ssh</command> clients and the <command>sshd</command> daemon.
|
---|
| 29 | This is useful for encrypting authentication and subsequent traffic over a
|
---|
| 30 | network.</para>
|
---|
[0931098] | 31 |
|
---|
| 32 | <sect3><title>Package information</title>
|
---|
| 33 | <itemizedlist spacing='compact'>
|
---|
[0fbab6b] | 34 | <listitem><para>Download (HTTP):
|
---|
| 35 | <ulink url="&openssh-download-http;"/></para></listitem>
|
---|
| 36 | <listitem><para>Download (FTP):
|
---|
| 37 | <ulink url="&openssh-download-ftp;"/></para></listitem>
|
---|
| 38 | <listitem><para>Download MD5 sum: &openssh-md5sum;</para></listitem>
|
---|
[0931098] | 39 | <listitem><para>Download size: &openssh-size;</para></listitem>
|
---|
[0fbab6b] | 40 | <listitem><para>Estimated disk space required:
|
---|
| 41 | &openssh-buildsize;</para></listitem>
|
---|
| 42 | <listitem><para>Estimated build time:
|
---|
| 43 | &openssh-time;</para></listitem></itemizedlist>
|
---|
[0931098] | 44 | </sect3>
|
---|
| 45 |
|
---|
[df7d6378] | 46 | <sect3><title><application>Open<acronym>SSH</acronym></application>
|
---|
| 47 | dependencies</title>
|
---|
[0931098] | 48 | <sect4><title>Required</title>
|
---|
[cef3a2f] | 49 | <para><xref linkend="openssl"/></para>
|
---|
[df7d6378] | 50 | </sect4>
|
---|
[0fbab6b] | 51 |
|
---|
[0931098] | 52 | <sect4><title>Optional</title>
|
---|
[df7d6378] | 53 | <para><xref linkend="Linux_PAM"/>,
|
---|
| 54 | <xref linkend="tcpwrappers"/>,
|
---|
| 55 | X (<xref linkend="xfree86"/> or <xref linkend="xorg"/>),
|
---|
| 56 | <xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
|
---|
| 57 | <xref linkend="j2sdk"/>,
|
---|
| 58 | <xref linkend="net-tools"/> and
|
---|
[0fbab6b] | 59 | <ulink url="http://www.opensc.org/">OpenSC</ulink></para>
|
---|
| 60 | </sect4>
|
---|
[0931098] | 61 | </sect3>
|
---|
| 62 |
|
---|
| 63 | </sect2>
|
---|
| 64 |
|
---|
| 65 | <sect2>
|
---|
[df7d6378] | 66 | <title>Installation of
|
---|
| 67 | <application>Open<acronym>SSH</acronym></application></title>
|
---|
[0931098] | 68 |
|
---|
| 69 | <para><application>Open<acronym>SSH</acronym></application> runs as two
|
---|
[df7d6378] | 70 | processes when connecting to other computers. The first process is a
|
---|
| 71 | privileged process and controls the issuance of privileges as necessary.
|
---|
| 72 | The second process communicates with the network. Additional installation
|
---|
| 73 | steps are necessary to set up the proper environment, which are performed
|
---|
| 74 | by the following commands:</para>
|
---|
[0931098] | 75 |
|
---|
| 76 | <screen><userinput><command>mkdir /var/empty &&
|
---|
| 77 | chown root:sys /var/empty &&
|
---|
| 78 | groupadd sshd &&
|
---|
| 79 | useradd -c 'sshd privsep' -d /var/empty -g sshd -s /bin/false sshd</command></userinput></screen>
|
---|
| 80 |
|
---|
| 81 | <para><application>OpenSSH</application> is very sensitive to changes in the
|
---|
| 82 | linked <application>OpenSSL</application> libraries. If you recompile
|
---|
| 83 | <application>OpenSSL</application>, <application>OpenSSH</application> may
|
---|
[df7d6378] | 84 | fail to startup. An alternative is to link against the static
|
---|
| 85 | <application>OpenSSL</application> library. To link against the static
|
---|
| 86 | library, execute the following command:</para>
|
---|
[0931098] | 87 |
|
---|
| 88 | <screen><userinput><command>sed -i "s:-lcrypto:/usr/lib/libcrypto.a:g" configure</command></userinput></screen>
|
---|
| 89 |
|
---|
| 90 | <para>Install <application>Open<acronym>SSH</acronym></application> by running
|
---|
| 91 | the following commands:</para>
|
---|
| 92 |
|
---|
| 93 | <screen><userinput><command>./configure --prefix=/usr --sysconfdir=/etc/ssh \
|
---|
| 94 | --libexecdir=/usr/sbin --with-md5-passwords &&
|
---|
| 95 | make &&
|
---|
| 96 | make install</command></userinput></screen>
|
---|
| 97 |
|
---|
| 98 | </sect2>
|
---|
| 99 |
|
---|
| 100 | <sect2>
|
---|
| 101 | <title>Command explanations</title>
|
---|
| 102 |
|
---|
| 103 | <para><parameter>--sysconfdir=/etc/ssh</parameter>: This prevents the
|
---|
[df7d6378] | 104 | configuration files from going to
|
---|
| 105 | <filename class="directory">/usr/etc</filename>.</para>
|
---|
[0931098] | 106 |
|
---|
| 107 | <para><parameter>--with-md5-passwords</parameter>: This is required
|
---|
| 108 | if you made the changes recommended by the shadowpasswd_plus
|
---|
| 109 | <acronym>LFS</acronym> hint on
|
---|
| 110 | your <acronym>SSH</acronym> server when you installed the Shadow Password
|
---|
| 111 | Suite or if you access a <acronym>SSH</acronym> server that authenticates by
|
---|
| 112 | user passwords encrypted with md5. </para>
|
---|
| 113 |
|
---|
| 114 | <para><parameter>--libexecdir=/usr/sbin</parameter>:
|
---|
[df7d6378] | 115 | <application>Open<acronym>SSH</acronym></application> installs programs called
|
---|
| 116 | by programs in <filename class="directory">/usr/libexec</filename>.
|
---|
[0931098] | 117 | <command>sftp-server</command> is a <command>sshd</command>
|
---|
| 118 | utility and <command>ssh-askpass</command> is a <command>ssh-add</command>
|
---|
[df7d6378] | 119 | utility that is installed as a link to <command>X11-ssh-askpass</command>.
|
---|
[0931098] | 120 | Both of these should go in <filename class="directory">/usr/sbin</filename>
|
---|
| 121 | not <filename class="directory">/usr/libexec</filename>.</para>
|
---|
| 122 |
|
---|
| 123 | </sect2>
|
---|
| 124 |
|
---|
| 125 | <sect2>
|
---|
| 126 | <title>Configuring <application>Open<acronym>SSH</acronym></application></title>
|
---|
| 127 |
|
---|
| 128 | <sect3><title>Config files</title>
|
---|
| 129 |
|
---|
[df7d6378] | 130 | <para><filename>/etc/ssh/ssh_config</filename> and
|
---|
[0931098] | 131 | <filename>/etc/ssh/sshd_config </filename></para>
|
---|
[df7d6378] | 132 |
|
---|
| 133 | <para>There are no required changes to either of these files. However,
|
---|
[0931098] | 134 | you may wish to view them to make changes for appropriate security to
|
---|
[90631d03] | 135 | your system. One recomended change is that you disable root login via
|
---|
| 136 | ssh. Execute the following command to disable root login via ssh:</para>
|
---|
| 137 |
|
---|
| 138 | <screen><userinput><command>echo "PermitRootLogin no" >> /etc/ssh/sshd_config</command></userinput></screen>
|
---|
| 139 |
|
---|
| 140 | <para>Additional configuration information can be found in the man pages for
|
---|
[df7d6378] | 141 | <command>sshd</command>, <command>ssh</command> and
|
---|
| 142 | <command>ssh-agent</command></para>
|
---|
[0931098] | 143 | </sect3>
|
---|
| 144 |
|
---|
| 145 | <sect3><title>sshd init.d script</title>
|
---|
| 146 |
|
---|
[df7d6378] | 147 | <para>To start the <acronym>SSH</acronym> server at system boot, install the
|
---|
| 148 | <filename>/etc/rc.d/init.d/sshd</filename> init script included in the
|
---|
| 149 | <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
| 150 |
|
---|
[0931098] | 151 | <screen><userinput><command>make install-sshd</command></userinput></screen>
|
---|
| 152 | </sect3>
|
---|
| 153 |
|
---|
| 154 | </sect2>
|
---|
| 155 |
|
---|
| 156 | <sect2>
|
---|
| 157 | <title>Contents</title>
|
---|
| 158 |
|
---|
[df7d6378] | 159 | <para>The <application>Open<acronym>SSH</acronym></application> package
|
---|
| 160 | contains <command>ssh</command>, <command>sshd</command>,
|
---|
| 161 | <command>ssh-agent</command>, <command>ssh-add</command>,
|
---|
| 162 | <command>sftp</command>, <command>scp</command>,
|
---|
| 163 | <command>ssh-keygen</command>, <command>sftp-server</command> and
|
---|
[0931098] | 164 | <command>ssh-keyscan</command>.</para>
|
---|
| 165 |
|
---|
| 166 | </sect2>
|
---|
| 167 |
|
---|
| 168 | <sect2><title>Description</title>
|
---|
| 169 |
|
---|
| 170 | <sect3><title>ssh</title>
|
---|
[df7d6378] | 171 | <para>The basic <command>rlogin</command>/<command>rsh</command>-like
|
---|
| 172 | client program.</para></sect3>
|
---|
[0931098] | 173 |
|
---|
| 174 | <sect3><title>sshd</title>
|
---|
[df7d6378] | 175 | <para>The daemon that listens for <command>ssh</command> login
|
---|
| 176 | requests.</para></sect3>
|
---|
[0931098] | 177 |
|
---|
| 178 | <sect3><title>ssh-agent</title>
|
---|
| 179 | <para>An authentication agent that can store private keys.</para></sect3>
|
---|
| 180 |
|
---|
| 181 | <sect3><title>ssh-add</title>
|
---|
| 182 | <para>Tool which adds keys to the <command>ssh-agent</command>.</para></sect3>
|
---|
| 183 |
|
---|
| 184 | <sect3><title>sftp</title>
|
---|
| 185 | <para><acronym>FTP</acronym>-like program that works over
|
---|
| 186 | <acronym>SSH</acronym>1 and <acronym>SSH</acronym>2 protocols.</para></sect3>
|
---|
| 187 |
|
---|
| 188 | <sect3><title>scp</title>
|
---|
[df7d6378] | 189 | <para>File copy program that acts like <command>rcp</command>.</para></sect3>
|
---|
[0931098] | 190 |
|
---|
| 191 | <sect3><title>ssh-keygen</title>
|
---|
| 192 | <para>Key generation tool.</para></sect3>
|
---|
| 193 |
|
---|
| 194 | <sect3><title>sftp-server</title>
|
---|
| 195 | <para><acronym>SFTP</acronym> server subsystem.</para></sect3>
|
---|
| 196 |
|
---|
| 197 | <sect3><title>ssh-keyscan</title>
|
---|
[df7d6378] | 198 | <para>Utility for gathering public host keys from a number of
|
---|
| 199 | hosts.</para></sect3>
|
---|
[0931098] | 200 |
|
---|
| 201 | </sect2>
|
---|
[f45b1953] | 202 |
|
---|
| 203 | </sect1>
|
---|
| 204 |
|
---|