source: server/major/openssh.xml@ 40489604

6.3 6.3-rc3
Last change on this file since 40489604 was 410e228b, checked in by Randy McMurchy <randy@…>, 16 years ago

Removed extraneous whitespace from the ends of line text

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@7431 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 15.5 KB
RevLine 
[0931098]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/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">
[6c24da75]9 <!ENTITY openssh-md5sum "50a800fd2c6def9e9a53068837e87b91">
10 <!ENTITY openssh-size "968 KB">
11 <!ENTITY openssh-buildsize "16.2 MB">
12 <!ENTITY openssh-time "0.5 SBU (additional 1.2 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>
21 </sect1info>
22
23 <title>OpenSSH-&openssh-version;</title>
24
25 <indexterm zone="openssh">
26 <primary sortas="a-OpenSSH">OpenSSH</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to OpenSSH</title>
31
32 <para>The <application>OpenSSH</application> package contains
33 <command>ssh</command> clients and the <command>sshd</command> daemon.
34 This is useful for encrypting authentication and subsequent traffic
35 over a network.</para>
36
37 <bridgehead renderas="sect3">Package Information</bridgehead>
38 <itemizedlist spacing="compact">
39 <listitem>
40 <para>Download (HTTP): <ulink url="&openssh-download-http;"/></para>
41 </listitem>
42 <listitem>
43 <para>Download (FTP): <ulink url="&openssh-download-ftp;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download MD5 sum: &openssh-md5sum;</para>
47 </listitem>
48 <listitem>
49 <para>Download size: &openssh-size;</para>
50 </listitem>
51 <listitem>
52 <para>Estimated disk space required: &openssh-buildsize;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated build time: &openssh-time;</para>
56 </listitem>
57 </itemizedlist>
58
59 <bridgehead renderas="sect3">OpenSSH Dependencies</bridgehead>
60
61 <bridgehead renderas="sect4">Required</bridgehead>
[a6ac43b]62 <para role="required"><xref linkend="openssl"/></para>
[e4e0d060]63
64 <bridgehead renderas="sect4">Optional</bridgehead>
[a6ac43b]65 <para role="optional"><xref linkend="linux-pam"/>,
[e4e0d060]66 <xref linkend="tcpwrappers"/>,
[e77976f]67 <xref linkend="x-window-system"/>,
[e4e0d060]68 <xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
69 <xref linkend="net-tools"/>,
[b21c661]70 <xref linkend="sysstat"/>,
[3e6f331]71 <ulink url="http://www.thrysoee.dk/editline/">libedit</ulink>
72 (provides a command-line history feature to <command>sftp</command>),
[608a225]73 <ulink url="http://www.opensc-project.org/">OpenSC</ulink>, and
[9561d7e]74 <ulink
75 url="http://www.citi.umich.edu/projects/smartcard/sectok.html">libsectok</ulink></para>
76
[1663c2b5]77 <para condition="html" role="usernotes">User Notes:
78 <ulink url='&blfs-wiki;/OpenSSH'/></para>
[e4e0d060]79
80 </sect2>
81
82 <sect2 role="installation">
83 <title>Installation of OpenSSH</title>
84
85 <para><application>OpenSSH</application> runs as two processes when
86 connecting to other computers. The first process is a privileged process
87 and controls the issuance of privileges as necessary. The second process
88 communicates with the network. Additional installation steps are necessary
[3de6059]89 to set up the proper environment, which are performed by issuing the
90 following commands as the <systemitem class="username">root</systemitem>
91 user:</para>
[e4e0d060]92
[45f3870]93<screen role="root"><userinput>install -v -m700 -d /var/lib/sshd &amp;&amp;
94chown -v root:sys /var/lib/sshd &amp;&amp;
[b21c661]95groupadd -g 50 sshd &amp;&amp;
96useradd -c 'sshd PrivSep' -d /var/lib/sshd -g sshd \
97 -s /bin/false -u 50 sshd</userinput></screen>
[0931098]98
[e4e0d060]99 <para><application>OpenSSH</application> is very sensitive to changes in
100 the linked <application>OpenSSL</application> libraries. If you recompile
101 <application>OpenSSL</application>, <application>OpenSSH</application> may
102 fail to startup. An alternative is to link against the static
103 <application>OpenSSL</application> library. To link against the static
104 library, execute the following command:</para>
[0931098]105
[6c24da75]106<screen><userinput>sed -i 's@-lcrypto@/usr/lib/libcrypto.a -ldl@' configure</userinput></screen>
[0931098]107
[e4e0d060]108 <para>Install <application>OpenSSH</application> by running
109 the following commands:</para>
[0931098]110
[6c24da75]111<screen><userinput>sed -i 's@ -ldes@@' configure &amp;&amp;
112./configure --prefix=/usr --sysconfdir=/etc/ssh --datadir=/usr/share/sshd \
[03fea94]113 --libexecdir=/usr/lib/openssh --with-md5-passwords \
[4ea98296]114 --with-privsep-path=/var/lib/sshd \
115 --with-xauth=/usr/bin/xauth &amp;&amp;
[3a3b19b]116make</userinput></screen>
[1b83a7c1]117
[e4e0d060]118 <para>If you linked <application>tcp_wrappers</application> into the
119 build using the <option>--with-tcp-wrappers</option> parameter, ensure
120 you add 127.0.0.1 to the sshd line in <filename>/etc/hosts.allow</filename>
121 if you have a restrictive <filename>/etc/hosts.deny</filename> file, or the
[7c9e252]122 test suite will fail. Additionally, the testsuite requires an installed
123 copy of <command>scp</command> to complete the mulitplexing tests. To
[410e228b]124 run the test suite, issue the following commnds as the
[7c9e252]125 <systemitem class="username">root</systemitem> user:</para>
126
127<screen role="root"><userinput>if test -f /usr/bin/scp
128then
129 mv /usr/bin/scp /usr/bin/scp-bak
130fi &amp;&amp;
131cp scp /usr/bin/scp &amp;&amp;
132make tests 2&gt;&amp;1 | tee check.log
133grep "FATAL" check.log</userinput></screen>
134
135 <para>If the above command produces no 'FATAL' errors, then proceed
[410e228b]136 with the installation, again as the
[7c9e252]137 <systemitem class="username">root</systemitem> user:</para>
138
139<screen role="root"><userinput>rm /usr/bin/scp &amp;&amp;
140if test -f /usr/bin/scp-bak
141then
142 rm /usr/bin/scp-bak
143fi &amp;&amp;
144make install &amp;&amp;
[45f3870]145install -v -m755 -d /usr/share/doc/openssh-&openssh-version; &amp;&amp;
146install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \
147 /usr/share/doc/openssh-&openssh-version;</userinput></screen>
[e4e0d060]148
149 </sect2>
150
151 <sect2 role="commands">
152 <title>Command Explanations</title>
153
[6c24da75]154 <para><command>sed -i 's@ -ldes@@' configure</command>:
[3a3b19b]155 This command fixes a build crash if you used the
156 <option>--with-kerberos5</option> parameter and you built the
157 <application>Heimdal</application> package in accordance with the BLFS
158 instructions. The command is harmless in all other instances.</para>
159
[e4e0d060]160 <para><parameter>--sysconfdir=/etc/ssh</parameter>: This prevents
161 the configuration files from being installed in
162 <filename class="directory">/usr/etc</filename>.</para>
[f45b1953]163
[6c24da75]164 <para><parameter>--datadir=/usr/share/sshd</parameter>: This switch
[410e228b]165 puts the Ssh.bin file (used for SmartCard authentication) in
[6c24da75]166 <filename class="directory">/usr/share/sshd</filename>.</para>
167
168<!-- WOW, this description is really old, IIRC it was obsolete shortly
169 before I was an editor, as the hint became a part of both books.
170 I'll leave it in for now JIC - Delete Later
171 <para><parameter>- -with-md5-passwords</parameter>: This is required
[e4e0d060]172 if you made the changes recommended by the shadowpasswd_plus
173 LFS hint on your SSH server when you installed the Shadow Password
174 Suite or if you access a SSH server that authenticates by
175 user passwords encrypted with md5.</para>
[6c24da75]176-->
177
178 <para><parameter>--with-md5-passwords</parameter>: This is required
179 with the default configuration of Shadow password suite in LFS.</para>
[e4e0d060]180
[1b744785]181 <para><parameter>--libexecdir=/usr/lib/openssh</parameter>: This parameter
[e4e0d060]182 changes the installation path of some programs to
[1b744785]183 <filename class="directory">/usr/lib/openssh</filename> instead of
[e4e0d060]184 <filename class="directory">/usr/libexec</filename>.</para>
185
[ba7a0ce]186 <para><parameter>--with-pam</parameter>: This parameter enables
187 <application>Linux-PAM</application> support in the build.</para>
188
[4ea98296]189 <para><parameter>--with-xauth=/usr/bin/xauth</parameter>: Set the
[410e228b]190 default location for the <command>xauth</command> binary for X
[4ea98296]191 authentication. Change the location if <command>xauth</command> will
[410e228b]192 be installed to a different path. This can also be controlled from
[4ea98296]193 <filename>sshd_config</filename> with the XAuthLocation keyword.
[618b9a7]194 You can omit this switch if <application>Xorg</application> is already
[4ea98296]195 installed.
196 </para>
197
[e4e0d060]198 </sect2>
199
200 <sect2 role="configuration">
201 <title>Configuring OpenSSH</title>
202
203 <sect3 id="openssh-config">
204 <title>Config Files</title>
205
206 <para><filename>~/.ssh/*</filename>,
207 <filename>/etc/ssh/ssh_config</filename>, and
208 <filename>/etc/ssh/sshd_config</filename></para>
209
210 <indexterm zone="openssh openssh-config">
211 <primary sortas="e-AA.ssh">~/.ssh/*</primary>
212 </indexterm>
213
214 <indexterm zone="openssh openssh-config">
215 <primary sortas="e-etc-ssh-ssh_config">/etc/ssh/ssh_config</primary>
216 </indexterm>
217
218 <indexterm zone="openssh openssh-config">
219 <primary sortas="e-etc-ssh-sshd_config">/etc/ssh/sshd_config</primary>
220 </indexterm>
221
222 <para>There are no required changes to any of these files. However,
223 you may wish to view the <filename class='directory'>/etc/ssh/</filename>
[823b1a3]224 files and make any changes appropriate for the security of your system.
[bfb7882]225 One recommended change is that you disable
[823b1a3]226 <systemitem class='username'>root</systemitem> login via
227 <command>ssh</command>. Execute the following command as the
228 <systemitem class='username'>root</systemitem> user to disable
229 <systemitem class='username'>root</systemitem> login via
[e4e0d060]230 <command>ssh</command>:</para>
231
[6c24da75]232<screen role="root"><userinput>echo "PermitRootLogin no" &gt;&gt; /etc/ssh/sshd_config</userinput></screen>
233
234 <para>If you added <application>LinuxPAM</application> support, then you
[410e228b]235 will need to add a configuration file for
[6c24da75]236 <application>sshd</application>. Issue the following commands as the
237 <systemitem class='username'>root</systemitem> user:</para>
238
239<screen role="root"><userinput>sed 's@d/login@d/sshd@g' /etc/pam.d/login &gt; /etc/pam.d/sshd &amp;&amp;
240chmod 644 /etc/pam.d/sshd</userinput></screen>
[e4e0d060]241
242 <para>Additional configuration information can be found in the man
243 pages for <command>sshd</command>, <command>ssh</command> and
244 <command>ssh-agent</command>.</para>
245
246 </sect3>
247
248 <sect3 id="openssh-init">
249 <title>Boot Script</title>
250
251 <para>To start the SSH server at system boot, install the
252 <filename>/etc/rc.d/init.d/sshd</filename> init script included
[5254d12]253 in the <xref linkend="bootscripts"/> package.</para>
[e4e0d060]254
255 <indexterm zone="openssh openssh-init">
256 <primary sortas="f-sshd">sshd</primary>
257 </indexterm>
258
259<screen role="root"><userinput>make install-sshd</userinput></screen>
260
261 </sect3>
262
263 </sect2>
264
265 <sect2 role="content">
266 <title>Contents</title>
267
268 <segmentedlist>
269 <segtitle>Installed Programs</segtitle>
270 <segtitle>Installed Libraries</segtitle>
271 <segtitle>Installed Directories</segtitle>
272
273 <seglistitem>
274 <seg>scp, sftp, sftp-server, slogin, ssh, sshd, ssh-add, ssh-agent,
275 ssh-keygen, ssh-keyscan, and ssh-keysign</seg>
276 <seg>None</seg>
[45f3870]277 <seg>/etc/ssh, /var/lib/sshd and
278 /usr/share/doc/openssh-&openssh-version;</seg>
[e4e0d060]279 </seglistitem>
280 </segmentedlist>
281
282 <variablelist>
283 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
284 <?dbfo list-presentation="list"?>
285 <?dbhtml list-presentation="table"?>
286
287 <varlistentry id="scp">
288 <term><command>scp</command></term>
289 <listitem>
290 <para>is a file copy program that acts like <command>rcp</command>
291 except it uses an encrypted protocol.</para>
292 <indexterm zone="openssh scp">
293 <primary sortas="b-scp">scp</primary>
294 </indexterm>
295 </listitem>
296 </varlistentry>
297
298 <varlistentry id="sftp">
299 <term><command>sftp</command></term>
300 <listitem>
301 <para>is an FTP-like program that works over
302 SSH1 and SSH2 protocols.</para>
303 <indexterm zone="openssh sftp">
304 <primary sortas="b-sftp">sftp</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
309 <varlistentry id="sftp-server">
310 <term><command>sftp-server</command></term>
311 <listitem>
[0c6194bb]312 <para>is an SFTP server subsystem. This program is not normally
313 called directly by the user.</para>
[e4e0d060]314 <indexterm zone="openssh sftp-server">
315 <primary sortas="b-sftp-server">sftp-server</primary>
316 </indexterm>
317 </listitem>
318 </varlistentry>
319
320 <varlistentry id="slogin">
321 <term><command>slogin</command></term>
322 <listitem>
323 <para>is a symlink to <command>ssh</command>.</para>
324 <indexterm zone="openssh slogin">
325 <primary sortas="g-slogin">slogin</primary>
326 </indexterm>
327 </listitem>
328 </varlistentry>
329
330 <varlistentry id="ssh">
331 <term><command>ssh</command></term>
332 <listitem>
333 <para>is an <command>rlogin</command>/<command>rsh</command>-like
334 client program except it uses an encrypted protocol.</para>
335 <indexterm zone="openssh ssh">
336 <primary sortas="b-ssh">ssh</primary>
337 </indexterm>
338 </listitem>
339 </varlistentry>
340
341 <varlistentry id="sshd">
342 <term><command>sshd</command></term>
343 <listitem>
344 <para>is a daemon that listens for <command>ssh</command> login
345 requests.</para>
346 <indexterm zone="openssh sshd">
347 <primary sortas="b-sshd">sshd</primary>
348 </indexterm>
349 </listitem>
350 </varlistentry>
351
352 <varlistentry id="ssh-add">
353 <term><command>ssh-add</command></term>
354 <listitem>
355 <para>is a tool which adds keys to the
356 <command>ssh-agent</command>.</para>
357 <indexterm zone="openssh ssh-add">
358 <primary sortas="b-ssh-add">ssh-add</primary>
359 </indexterm>
360 </listitem>
361 </varlistentry>
362
363 <varlistentry id="ssh-agent">
364 <term><command>ssh-agent</command></term>
365 <listitem>
366 <para>is an authentication agent that can store private keys.</para>
367 <indexterm zone="openssh ssh-agent">
368 <primary sortas="b-ssh-agent">ssh-agent</primary>
369 </indexterm>
370 </listitem>
371 </varlistentry>
372
373 <varlistentry id="ssh-keygen">
374 <term><command>ssh-keygen</command></term>
375 <listitem>
376 <para>is a key generation tool.</para>
377 <indexterm zone="openssh ssh-keygen">
378 <primary sortas="b-ssh-keygen">ssh-keygen</primary>
379 </indexterm>
380 </listitem>
381 </varlistentry>
382
383 <varlistentry id="ssh-keyscan">
384 <term><command>ssh-keyscan</command></term>
385 <listitem>
386 <para>is a utility for gathering public host keys from a
387 number of hosts.</para>
388 <indexterm zone="openssh ssh-keyscan">
389 <primary sortas="b-ssh-keyscan">ssh-keyscan</primary>
390 </indexterm>
391 </listitem>
392 </varlistentry>
393
394 <varlistentry id="ssh-keysign">
395 <term><command>ssh-keysign</command></term>
396 <listitem>
397 <para>is used by <command>ssh</command> to access the local host
398 keys and generate the digital signature required during hostbased
[0c6194bb]399 authentication with SSH protocol version 2. This program is not normally
400 called directly by the user.</para>
[e4e0d060]401 <indexterm zone="openssh ssh-keysign">
402 <primary sortas="b-ssh-keysign">ssh-keysign</primary>
403 </indexterm>
404 </listitem>
405 </varlistentry>
406
407 </variablelist>
408
409 </sect2>
410
411</sect1>
Note: See TracBrowser for help on using the repository browser.