[0931098] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[0931098] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[e4e0d060] | 7 | <!ENTITY openssh-download-http "http://sunsite.ualberta.ca/pub/OpenBSD/OpenSSH/portable/openssh-&openssh-version;.tar.gz">
|
---|
[3a3b19b] | 8 | <!ENTITY openssh-download-ftp "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-&openssh-version;.tar.gz">
|
---|
| 9 | <!ENTITY openssh-md5sum "df899194a340c933944b193477c628fa">
|
---|
| 10 | <!ENTITY openssh-size "914 KB">
|
---|
| 11 | <!ENTITY openssh-buildsize "15.7 MB">
|
---|
| 12 | <!ENTITY openssh-time "0.5 SBU (additional 0.5 SBU to run the test suite)">
|
---|
[0931098] | 13 | ]>
|
---|
| 14 |
|
---|
[1708d1e9] | 15 | <sect1 id="openssh" xreflabel="OpenSSH-&openssh-version;">
|
---|
[e4e0d060] | 16 | <?dbhtml filename="openssh.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
[a6ac43b] | 21 | <keywordset>
|
---|
| 22 | <keyword role="package">openssh-&openssh-version;.tar</keyword>
|
---|
[2a5310e8] | 23 | <keyword role="ftpdir">openssh</keyword>
|
---|
[a6ac43b] | 24 | </keywordset>
|
---|
[e4e0d060] | 25 | </sect1info>
|
---|
| 26 |
|
---|
| 27 | <title>OpenSSH-&openssh-version;</title>
|
---|
| 28 |
|
---|
| 29 | <indexterm zone="openssh">
|
---|
| 30 | <primary sortas="a-OpenSSH">OpenSSH</primary>
|
---|
| 31 | </indexterm>
|
---|
| 32 |
|
---|
| 33 | <sect2 role="package">
|
---|
| 34 | <title>Introduction to OpenSSH</title>
|
---|
| 35 |
|
---|
| 36 | <para>The <application>OpenSSH</application> package contains
|
---|
| 37 | <command>ssh</command> clients and the <command>sshd</command> daemon.
|
---|
| 38 | This is useful for encrypting authentication and subsequent traffic
|
---|
| 39 | over a network.</para>
|
---|
| 40 |
|
---|
| 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>Download (HTTP): <ulink url="&openssh-download-http;"/></para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>Download (FTP): <ulink url="&openssh-download-ftp;"/></para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download MD5 sum: &openssh-md5sum;</para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Download size: &openssh-size;</para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Estimated disk space required: &openssh-buildsize;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
| 59 | <para>Estimated build time: &openssh-time;</para>
|
---|
| 60 | </listitem>
|
---|
| 61 | </itemizedlist>
|
---|
| 62 |
|
---|
| 63 | <bridgehead renderas="sect3">OpenSSH Dependencies</bridgehead>
|
---|
| 64 |
|
---|
| 65 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[a6ac43b] | 66 | <para role="required"><xref linkend="openssl"/></para>
|
---|
[e4e0d060] | 67 |
|
---|
| 68 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[a6ac43b] | 69 | <para role="optional"><xref linkend="linux-pam"/>,
|
---|
[e4e0d060] | 70 | <xref linkend="tcpwrappers"/>,
|
---|
| 71 | X (<xref linkend="xfree86"/> or <xref linkend="xorg"/>),
|
---|
| 72 | <xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
|
---|
| 73 | <xref linkend="jdk"/>,
|
---|
| 74 | <xref linkend="net-tools"/>,
|
---|
[b21c661] | 75 | <xref linkend="sysstat"/>,
|
---|
[e4e0d060] | 76 | <ulink url="http://www.opensc.org/">OpenSC</ulink> and
|
---|
| 77 | <ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink></para>
|
---|
| 78 |
|
---|
| 79 | </sect2>
|
---|
| 80 |
|
---|
| 81 | <sect2 role="installation">
|
---|
| 82 | <title>Installation of OpenSSH</title>
|
---|
| 83 |
|
---|
| 84 | <para><application>OpenSSH</application> runs as two processes when
|
---|
| 85 | connecting to other computers. The first process is a privileged process
|
---|
| 86 | and controls the issuance of privileges as necessary. The second process
|
---|
| 87 | communicates with the network. Additional installation steps are necessary
|
---|
| 88 | to set up the proper environment, which are performed by the following
|
---|
| 89 | commands:</para>
|
---|
| 90 |
|
---|
[45f3870] | 91 | <screen role="root"><userinput>install -v -m700 -d /var/lib/sshd &&
|
---|
| 92 | chown -v root:sys /var/lib/sshd &&
|
---|
[b21c661] | 93 | groupadd -g 50 sshd &&
|
---|
| 94 | useradd -c 'sshd PrivSep' -d /var/lib/sshd -g sshd \
|
---|
| 95 | -s /bin/false -u 50 sshd</userinput></screen>
|
---|
[0931098] | 96 |
|
---|
[e4e0d060] | 97 | <para><application>OpenSSH</application> is very sensitive to changes in
|
---|
| 98 | the linked <application>OpenSSL</application> libraries. If you recompile
|
---|
| 99 | <application>OpenSSL</application>, <application>OpenSSH</application> may
|
---|
| 100 | fail to startup. An alternative is to link against the static
|
---|
| 101 | <application>OpenSSL</application> library. To link against the static
|
---|
| 102 | library, execute the following command:</para>
|
---|
[0931098] | 103 |
|
---|
[e4e0d060] | 104 | <screen><userinput>sed -i "s:-lcrypto:/usr/lib/libcrypto.a:g" configure</userinput></screen>
|
---|
[0931098] | 105 |
|
---|
[e4e0d060] | 106 | <para>Install <application>OpenSSH</application> by running
|
---|
| 107 | the following commands:</para>
|
---|
[0931098] | 108 |
|
---|
[3a3b19b] | 109 | <screen><userinput>sed -i "s/lkrb5 -ldes/lkrb5/" configure &&
|
---|
| 110 | ./configure --prefix=/usr --sysconfdir=/etc/ssh \
|
---|
[1b83a7c1] | 111 | --libexecdir=/usr/sbin --with-md5-passwords \
|
---|
[3a3b19b] | 112 | --with-privsep-path=/var/lib/sshd &&
|
---|
| 113 | make</userinput></screen>
|
---|
[1b83a7c1] | 114 |
|
---|
[3a3b19b] | 115 | <!-- Leaving this bunch of stuff for now. The description of all
|
---|
| 116 | this is now in the Command Explanatations, however.
|
---|
[e4e0d060] | 117 | <para>If you use <application>Heimdal</application> as your Kerberos5
|
---|
| 118 | implementation and you linked the <application>Heimdal</application>
|
---|
[45f3870] | 119 | libraries into the <application>OpenSSH</application> build using the
|
---|
[3a3b19b] | 120 | <option>-with-kerberos5</option> parameter, you'll need to modify the
|
---|
[45f3870] | 121 | <filename>Makefile</filename> if you previously linked
|
---|
| 122 | <application>OpenSSL</application> into the
|
---|
| 123 | <application>Heimdal</application> build or the build will fail. The
|
---|
| 124 | <application>OpenSSH</application> default expects
|
---|
| 125 | <application>Heimdal</application> was built using the included
|
---|
| 126 | <filename class='libraryfile'>libdes</filename> library instead of
|
---|
| 127 | <application>OpenSSL</application>. Use the following command to modify
|
---|
| 128 | the <filename>Makefile</filename>:</para>
|
---|
[3a3b19b] | 129 | -->
|
---|
[1b83a7c1] | 130 |
|
---|
[e4e0d060] | 131 | <para>If you linked <application>tcp_wrappers</application> into the
|
---|
| 132 | build using the <option>--with-tcp-wrappers</option> parameter, ensure
|
---|
| 133 | you add 127.0.0.1 to the sshd line in <filename>/etc/hosts.allow</filename>
|
---|
| 134 | if you have a restrictive <filename>/etc/hosts.deny</filename> file, or the
|
---|
[45f3870] | 135 | test suite will fail. To run the test suite, issue: <command>make -k
|
---|
| 136 | tests</command>. The banner tests are known to fail.</para>
|
---|
[f45b1953] | 137 |
|
---|
[e4e0d060] | 138 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 139 |
|
---|
[45f3870] | 140 | <screen role="root"><userinput>make install &&
|
---|
| 141 | install -v -m755 -d /usr/share/doc/openssh-&openssh-version; &&
|
---|
| 142 | install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \
|
---|
| 143 | /usr/share/doc/openssh-&openssh-version;</userinput></screen>
|
---|
[e4e0d060] | 144 |
|
---|
| 145 | </sect2>
|
---|
| 146 |
|
---|
| 147 | <sect2 role="commands">
|
---|
| 148 | <title>Command Explanations</title>
|
---|
| 149 |
|
---|
[3a3b19b] | 150 | <para><command>sed -i "s/lkrb5 -ldes/lkrb5/" configure</command>:
|
---|
| 151 | This command fixes a build crash if you used the
|
---|
| 152 | <option>--with-kerberos5</option> parameter and you built the
|
---|
| 153 | <application>Heimdal</application> package in accordance with the BLFS
|
---|
| 154 | instructions. The command is harmless in all other instances.</para>
|
---|
| 155 |
|
---|
[e4e0d060] | 156 | <para><parameter>--sysconfdir=/etc/ssh</parameter>: This prevents
|
---|
| 157 | the configuration files from being installed in
|
---|
| 158 | <filename class="directory">/usr/etc</filename>.</para>
|
---|
[f45b1953] | 159 |
|
---|
[e4e0d060] | 160 | <para><parameter>--with-md5-passwords</parameter>: This is required
|
---|
| 161 | if you made the changes recommended by the shadowpasswd_plus
|
---|
| 162 | LFS hint on your SSH server when you installed the Shadow Password
|
---|
| 163 | Suite or if you access a SSH server that authenticates by
|
---|
| 164 | user passwords encrypted with md5.</para>
|
---|
| 165 |
|
---|
| 166 | <para><parameter>--libexecdir=/usr/sbin</parameter>: This parameter
|
---|
| 167 | changes the installation path of some programs to
|
---|
| 168 | <filename class="directory">/usr/sbin</filename> instead of
|
---|
| 169 | <filename class="directory">/usr/libexec</filename>.</para>
|
---|
| 170 |
|
---|
| 171 | </sect2>
|
---|
| 172 |
|
---|
| 173 | <sect2 role="configuration">
|
---|
| 174 | <title>Configuring OpenSSH</title>
|
---|
| 175 |
|
---|
| 176 | <sect3 id="openssh-config">
|
---|
| 177 | <title>Config Files</title>
|
---|
| 178 |
|
---|
| 179 | <para><filename>~/.ssh/*</filename>,
|
---|
| 180 | <filename>/etc/ssh/ssh_config</filename>, and
|
---|
| 181 | <filename>/etc/ssh/sshd_config</filename></para>
|
---|
| 182 |
|
---|
| 183 | <indexterm zone="openssh openssh-config">
|
---|
| 184 | <primary sortas="e-AA.ssh">~/.ssh/*</primary>
|
---|
| 185 | </indexterm>
|
---|
| 186 |
|
---|
| 187 | <indexterm zone="openssh openssh-config">
|
---|
| 188 | <primary sortas="e-etc-ssh-ssh_config">/etc/ssh/ssh_config</primary>
|
---|
| 189 | </indexterm>
|
---|
| 190 |
|
---|
| 191 | <indexterm zone="openssh openssh-config">
|
---|
| 192 | <primary sortas="e-etc-ssh-sshd_config">/etc/ssh/sshd_config</primary>
|
---|
| 193 | </indexterm>
|
---|
| 194 |
|
---|
| 195 | <para>There are no required changes to any of these files. However,
|
---|
| 196 | you may wish to view the <filename class='directory'>/etc/ssh/</filename>
|
---|
[823b1a3] | 197 | files and make any changes appropriate for the security of your system.
|
---|
[bfb7882] | 198 | One recommended change is that you disable
|
---|
[823b1a3] | 199 | <systemitem class='username'>root</systemitem> login via
|
---|
| 200 | <command>ssh</command>. Execute the following command as the
|
---|
| 201 | <systemitem class='username'>root</systemitem> user to disable
|
---|
| 202 | <systemitem class='username'>root</systemitem> login via
|
---|
[e4e0d060] | 203 | <command>ssh</command>:</para>
|
---|
| 204 |
|
---|
| 205 | <screen role="root"><userinput>echo "PermitRootLogin no" >> /etc/ssh/sshd_config</userinput></screen>
|
---|
| 206 |
|
---|
| 207 | <para>Additional configuration information can be found in the man
|
---|
| 208 | pages for <command>sshd</command>, <command>ssh</command> and
|
---|
| 209 | <command>ssh-agent</command>.</para>
|
---|
| 210 |
|
---|
| 211 | </sect3>
|
---|
| 212 |
|
---|
| 213 | <sect3 id="openssh-init">
|
---|
| 214 | <title>Boot Script</title>
|
---|
| 215 |
|
---|
| 216 | <para>To start the SSH server at system boot, install the
|
---|
| 217 | <filename>/etc/rc.d/init.d/sshd</filename> init script included
|
---|
| 218 | in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
| 219 |
|
---|
| 220 | <indexterm zone="openssh openssh-init">
|
---|
| 221 | <primary sortas="f-sshd">sshd</primary>
|
---|
| 222 | </indexterm>
|
---|
| 223 |
|
---|
| 224 | <screen role="root"><userinput>make install-sshd</userinput></screen>
|
---|
| 225 |
|
---|
| 226 | </sect3>
|
---|
| 227 |
|
---|
| 228 | </sect2>
|
---|
| 229 |
|
---|
| 230 | <sect2 role="content">
|
---|
| 231 | <title>Contents</title>
|
---|
| 232 |
|
---|
| 233 | <segmentedlist>
|
---|
| 234 | <segtitle>Installed Programs</segtitle>
|
---|
| 235 | <segtitle>Installed Libraries</segtitle>
|
---|
| 236 | <segtitle>Installed Directories</segtitle>
|
---|
| 237 |
|
---|
| 238 | <seglistitem>
|
---|
| 239 | <seg>scp, sftp, sftp-server, slogin, ssh, sshd, ssh-add, ssh-agent,
|
---|
| 240 | ssh-keygen, ssh-keyscan, and ssh-keysign</seg>
|
---|
| 241 | <seg>None</seg>
|
---|
[45f3870] | 242 | <seg>/etc/ssh, /var/lib/sshd and
|
---|
| 243 | /usr/share/doc/openssh-&openssh-version;</seg>
|
---|
[e4e0d060] | 244 | </seglistitem>
|
---|
| 245 | </segmentedlist>
|
---|
| 246 |
|
---|
| 247 | <variablelist>
|
---|
| 248 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 249 | <?dbfo list-presentation="list"?>
|
---|
| 250 | <?dbhtml list-presentation="table"?>
|
---|
| 251 |
|
---|
| 252 | <varlistentry id="scp">
|
---|
| 253 | <term><command>scp</command></term>
|
---|
| 254 | <listitem>
|
---|
| 255 | <para>is a file copy program that acts like <command>rcp</command>
|
---|
| 256 | except it uses an encrypted protocol.</para>
|
---|
| 257 | <indexterm zone="openssh scp">
|
---|
| 258 | <primary sortas="b-scp">scp</primary>
|
---|
| 259 | </indexterm>
|
---|
| 260 | </listitem>
|
---|
| 261 | </varlistentry>
|
---|
| 262 |
|
---|
| 263 | <varlistentry id="sftp">
|
---|
| 264 | <term><command>sftp</command></term>
|
---|
| 265 | <listitem>
|
---|
| 266 | <para>is an FTP-like program that works over
|
---|
| 267 | SSH1 and SSH2 protocols.</para>
|
---|
| 268 | <indexterm zone="openssh sftp">
|
---|
| 269 | <primary sortas="b-sftp">sftp</primary>
|
---|
| 270 | </indexterm>
|
---|
| 271 | </listitem>
|
---|
| 272 | </varlistentry>
|
---|
| 273 |
|
---|
| 274 | <varlistentry id="sftp-server">
|
---|
| 275 | <term><command>sftp-server</command></term>
|
---|
| 276 | <listitem>
|
---|
| 277 | <para>is an SFTP server subsystem.</para>
|
---|
| 278 | <indexterm zone="openssh sftp-server">
|
---|
| 279 | <primary sortas="b-sftp-server">sftp-server</primary>
|
---|
| 280 | </indexterm>
|
---|
| 281 | </listitem>
|
---|
| 282 | </varlistentry>
|
---|
| 283 |
|
---|
| 284 | <varlistentry id="slogin">
|
---|
| 285 | <term><command>slogin</command></term>
|
---|
| 286 | <listitem>
|
---|
| 287 | <para>is a symlink to <command>ssh</command>.</para>
|
---|
| 288 | <indexterm zone="openssh slogin">
|
---|
| 289 | <primary sortas="g-slogin">slogin</primary>
|
---|
| 290 | </indexterm>
|
---|
| 291 | </listitem>
|
---|
| 292 | </varlistentry>
|
---|
| 293 |
|
---|
| 294 | <varlistentry id="ssh">
|
---|
| 295 | <term><command>ssh</command></term>
|
---|
| 296 | <listitem>
|
---|
| 297 | <para>is an <command>rlogin</command>/<command>rsh</command>-like
|
---|
| 298 | client program except it uses an encrypted protocol.</para>
|
---|
| 299 | <indexterm zone="openssh ssh">
|
---|
| 300 | <primary sortas="b-ssh">ssh</primary>
|
---|
| 301 | </indexterm>
|
---|
| 302 | </listitem>
|
---|
| 303 | </varlistentry>
|
---|
| 304 |
|
---|
| 305 | <varlistentry id="sshd">
|
---|
| 306 | <term><command>sshd</command></term>
|
---|
| 307 | <listitem>
|
---|
| 308 | <para>is a daemon that listens for <command>ssh</command> login
|
---|
| 309 | requests.</para>
|
---|
| 310 | <indexterm zone="openssh sshd">
|
---|
| 311 | <primary sortas="b-sshd">sshd</primary>
|
---|
| 312 | </indexterm>
|
---|
| 313 | </listitem>
|
---|
| 314 | </varlistentry>
|
---|
| 315 |
|
---|
| 316 | <varlistentry id="ssh-add">
|
---|
| 317 | <term><command>ssh-add</command></term>
|
---|
| 318 | <listitem>
|
---|
| 319 | <para>is a tool which adds keys to the
|
---|
| 320 | <command>ssh-agent</command>.</para>
|
---|
| 321 | <indexterm zone="openssh ssh-add">
|
---|
| 322 | <primary sortas="b-ssh-add">ssh-add</primary>
|
---|
| 323 | </indexterm>
|
---|
| 324 | </listitem>
|
---|
| 325 | </varlistentry>
|
---|
| 326 |
|
---|
| 327 | <varlistentry id="ssh-agent">
|
---|
| 328 | <term><command>ssh-agent</command></term>
|
---|
| 329 | <listitem>
|
---|
| 330 | <para>is an authentication agent that can store private keys.</para>
|
---|
| 331 | <indexterm zone="openssh ssh-agent">
|
---|
| 332 | <primary sortas="b-ssh-agent">ssh-agent</primary>
|
---|
| 333 | </indexterm>
|
---|
| 334 | </listitem>
|
---|
| 335 | </varlistentry>
|
---|
| 336 |
|
---|
| 337 | <varlistentry id="ssh-keygen">
|
---|
| 338 | <term><command>ssh-keygen</command></term>
|
---|
| 339 | <listitem>
|
---|
| 340 | <para>is a key generation tool.</para>
|
---|
| 341 | <indexterm zone="openssh ssh-keygen">
|
---|
| 342 | <primary sortas="b-ssh-keygen">ssh-keygen</primary>
|
---|
| 343 | </indexterm>
|
---|
| 344 | </listitem>
|
---|
| 345 | </varlistentry>
|
---|
| 346 |
|
---|
| 347 | <varlistentry id="ssh-keyscan">
|
---|
| 348 | <term><command>ssh-keyscan</command></term>
|
---|
| 349 | <listitem>
|
---|
| 350 | <para>is a utility for gathering public host keys from a
|
---|
| 351 | number of hosts.</para>
|
---|
| 352 | <indexterm zone="openssh ssh-keyscan">
|
---|
| 353 | <primary sortas="b-ssh-keyscan">ssh-keyscan</primary>
|
---|
| 354 | </indexterm>
|
---|
| 355 | </listitem>
|
---|
| 356 | </varlistentry>
|
---|
| 357 |
|
---|
| 358 | <varlistentry id="ssh-keysign">
|
---|
| 359 | <term><command>ssh-keysign</command></term>
|
---|
| 360 | <listitem>
|
---|
| 361 | <para>is used by <command>ssh</command> to access the local host
|
---|
| 362 | keys and generate the digital signature required during hostbased
|
---|
| 363 | authentication with SSH protocol version 2.</para>
|
---|
| 364 | <indexterm zone="openssh ssh-keysign">
|
---|
| 365 | <primary sortas="b-ssh-keysign">ssh-keysign</primary>
|
---|
| 366 | </indexterm>
|
---|
| 367 | </listitem>
|
---|
| 368 | </varlistentry>
|
---|
| 369 |
|
---|
| 370 | </variablelist>
|
---|
| 371 |
|
---|
| 372 | </sect2>
|
---|
| 373 |
|
---|
| 374 | </sect1>
|
---|