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