source: server/major/openssh.xml@ ba7a0ce

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since ba7a0ce was ba7a0ce, checked in by DJ Lucas <dj@…>, 16 years ago

Added note about OpenSSH testsuite failures.

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

  • Property mode set to 100644
File size: 14.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/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">
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)">
13]>
14
15<sect1 id="openssh" xreflabel="OpenSSH-&openssh-version;">
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>
62 <para role="required"><xref linkend="openssl"/></para>
63
64 <bridgehead renderas="sect4">Optional</bridgehead>
65 <para role="optional"><xref linkend="linux-pam"/>,
66 <xref linkend="tcpwrappers"/>,
67 <xref linkend="x-window-system"/>,
68 <xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
69 <xref linkend="net-tools"/>,
70 <xref linkend="sysstat"/>,
71 <ulink url="http://www.opensc-project.org/">OpenSC</ulink>, and
72 <ulink
73 url="http://www.citi.umich.edu/projects/smartcard/sectok.html">libsectok</ulink></para>
74
75 <para condition="html" role="usernotes">User Notes:
76 <ulink url='&blfs-wiki;/OpenSSH'/></para>
77
78 </sect2>
79
80 <sect2 role="installation">
81 <title>Installation of OpenSSH</title>
82
83 <para><application>OpenSSH</application> runs as two processes when
84 connecting to other computers. The first process is a privileged process
85 and controls the issuance of privileges as necessary. The second process
86 communicates with the network. Additional installation steps are necessary
87 to set up the proper environment, which are performed by issuing the
88 following commands as the <systemitem class="username">root</systemitem>
89 user:</para>
90
91<screen role="root"><userinput>install -v -m700 -d /var/lib/sshd &amp;&amp;
92chown -v root:sys /var/lib/sshd &amp;&amp;
93groupadd -g 50 sshd &amp;&amp;
94useradd -c 'sshd PrivSep' -d /var/lib/sshd -g sshd \
95 -s /bin/false -u 50 sshd</userinput></screen>
96
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>
103
104<screen><userinput>sed -i 's@-lcrypto@/usr/lib/libcrypto.a -ldl@' configure</userinput></screen>
105
106 <para>Install <application>OpenSSH</application> by running
107 the following commands:</para>
108
109<screen><userinput>sed -i 's@ -ldes@@' configure &amp;&amp;
110./configure --prefix=/usr --sysconfdir=/etc/ssh --datadir=/usr/share/sshd \
111 --libexecdir=/usr/lib/openssh --with-md5-passwords \
112 --with-privsep-path=/var/lib/sshd &amp;&amp;
113make</userinput></screen>
114
115 <para>If you linked <application>tcp_wrappers</application> into the
116 build using the <option>--with-tcp-wrappers</option> parameter, ensure
117 you add 127.0.0.1 to the sshd line in <filename>/etc/hosts.allow</filename>
118 if you have a restrictive <filename>/etc/hosts.deny</filename> file, or the
119 test suite will fail. To run the test suite, as the
120 <systemitem class="username">root</systemitem> user, issue:
121 <command>make -k tests 2&gt;&amp;1 | tee check.log</command>. Review the
122 <filename>check.log</filename> file for 'FATAL' tests.</para>
123
124 <note><para>The test suite is currently broken, in that it will try to
125 test against the installed <filename>sshd</filename>, which is why we
126 pass <parameter>-k</parameter> to the <command>make</command> command
127 above. You should run the test suite again after completing the
128 installation and configuration, without the <parameter>-k</parameter>
129 flag.</para></note>
130
131 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
132
133<screen role="root"><userinput>make install &amp;&amp;
134install -v -m755 -d /usr/share/doc/openssh-&openssh-version; &amp;&amp;
135install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \
136 /usr/share/doc/openssh-&openssh-version;</userinput></screen>
137
138 </sect2>
139
140 <sect2 role="commands">
141 <title>Command Explanations</title>
142
143 <para><command>sed -i 's@ -ldes@@' configure</command>:
144 This command fixes a build crash if you used the
145 <option>--with-kerberos5</option> parameter and you built the
146 <application>Heimdal</application> package in accordance with the BLFS
147 instructions. The command is harmless in all other instances.</para>
148
149 <para><parameter>--sysconfdir=/etc/ssh</parameter>: This prevents
150 the configuration files from being installed in
151 <filename class="directory">/usr/etc</filename>.</para>
152
153 <para><parameter>--datadir=/usr/share/sshd</parameter>: This switch
154 puts the Ssh.bin file (used for SmartCard authentication) in
155 <filename class="directory">/usr/share/sshd</filename>.</para>
156
157<!-- WOW, this description is really old, IIRC it was obsolete shortly
158 before I was an editor, as the hint became a part of both books.
159 I'll leave it in for now JIC - Delete Later
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
167 <para><parameter>--with-md5-passwords</parameter>: This is required
168 with the default configuration of Shadow password suite in LFS.</para>
169
170 <para><parameter>--libexecdir=/usr/lib/openssh</parameter>: This parameter
171 changes the installation path of some programs to
172 <filename class="directory">/usr/lib/openssh</filename> instead of
173 <filename class="directory">/usr/libexec</filename>.</para>
174
175 <para><parameter>--with-pam</parameter>: This parameter enables
176 <application>Linux-PAM</application> support in the build.</para>
177
178 </sect2>
179
180 <sect2 role="configuration">
181 <title>Configuring OpenSSH</title>
182
183 <sect3 id="openssh-config">
184 <title>Config Files</title>
185
186 <para><filename>~/.ssh/*</filename>,
187 <filename>/etc/ssh/ssh_config</filename>, and
188 <filename>/etc/ssh/sshd_config</filename></para>
189
190 <indexterm zone="openssh openssh-config">
191 <primary sortas="e-AA.ssh">~/.ssh/*</primary>
192 </indexterm>
193
194 <indexterm zone="openssh openssh-config">
195 <primary sortas="e-etc-ssh-ssh_config">/etc/ssh/ssh_config</primary>
196 </indexterm>
197
198 <indexterm zone="openssh openssh-config">
199 <primary sortas="e-etc-ssh-sshd_config">/etc/ssh/sshd_config</primary>
200 </indexterm>
201
202 <para>There are no required changes to any of these files. However,
203 you may wish to view the <filename class='directory'>/etc/ssh/</filename>
204 files and make any changes appropriate for the security of your system.
205 One recommended change is that you disable
206 <systemitem class='username'>root</systemitem> login via
207 <command>ssh</command>. Execute the following command as the
208 <systemitem class='username'>root</systemitem> user to disable
209 <systemitem class='username'>root</systemitem> login via
210 <command>ssh</command>:</para>
211
212<screen role="root"><userinput>echo "PermitRootLogin no" &gt;&gt; /etc/ssh/sshd_config</userinput></screen>
213
214 <para>If you added <application>LinuxPAM</application> support, then you
215 will need to add a configuration file for
216 <application>sshd</application>. Issue the following commands as the
217 <systemitem class='username'>root</systemitem> user:</para>
218
219<screen role="root"><userinput>sed 's@d/login@d/sshd@g' /etc/pam.d/login &gt; /etc/pam.d/sshd &amp;&amp;
220chmod 644 /etc/pam.d/sshd</userinput></screen>
221
222 <para>Additional configuration information can be found in the man
223 pages for <command>sshd</command>, <command>ssh</command> and
224 <command>ssh-agent</command>.</para>
225
226 </sect3>
227
228 <sect3 id="openssh-init">
229 <title>Boot Script</title>
230
231 <para>To start the SSH server at system boot, install the
232 <filename>/etc/rc.d/init.d/sshd</filename> init script included
233 in the <xref linkend="bootscripts"/> package.</para>
234
235 <indexterm zone="openssh openssh-init">
236 <primary sortas="f-sshd">sshd</primary>
237 </indexterm>
238
239<screen role="root"><userinput>make install-sshd</userinput></screen>
240
241 </sect3>
242
243 </sect2>
244
245 <sect2 role="content">
246 <title>Contents</title>
247
248 <segmentedlist>
249 <segtitle>Installed Programs</segtitle>
250 <segtitle>Installed Libraries</segtitle>
251 <segtitle>Installed Directories</segtitle>
252
253 <seglistitem>
254 <seg>scp, sftp, sftp-server, slogin, ssh, sshd, ssh-add, ssh-agent,
255 ssh-keygen, ssh-keyscan, and ssh-keysign</seg>
256 <seg>None</seg>
257 <seg>/etc/ssh, /var/lib/sshd and
258 /usr/share/doc/openssh-&openssh-version;</seg>
259 </seglistitem>
260 </segmentedlist>
261
262 <variablelist>
263 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
264 <?dbfo list-presentation="list"?>
265 <?dbhtml list-presentation="table"?>
266
267 <varlistentry id="scp">
268 <term><command>scp</command></term>
269 <listitem>
270 <para>is a file copy program that acts like <command>rcp</command>
271 except it uses an encrypted protocol.</para>
272 <indexterm zone="openssh scp">
273 <primary sortas="b-scp">scp</primary>
274 </indexterm>
275 </listitem>
276 </varlistentry>
277
278 <varlistentry id="sftp">
279 <term><command>sftp</command></term>
280 <listitem>
281 <para>is an FTP-like program that works over
282 SSH1 and SSH2 protocols.</para>
283 <indexterm zone="openssh sftp">
284 <primary sortas="b-sftp">sftp</primary>
285 </indexterm>
286 </listitem>
287 </varlistentry>
288
289 <varlistentry id="sftp-server">
290 <term><command>sftp-server</command></term>
291 <listitem>
292 <para>is an SFTP server subsystem. This program is not normally
293 called directly by the user.</para>
294 <indexterm zone="openssh sftp-server">
295 <primary sortas="b-sftp-server">sftp-server</primary>
296 </indexterm>
297 </listitem>
298 </varlistentry>
299
300 <varlistentry id="slogin">
301 <term><command>slogin</command></term>
302 <listitem>
303 <para>is a symlink to <command>ssh</command>.</para>
304 <indexterm zone="openssh slogin">
305 <primary sortas="g-slogin">slogin</primary>
306 </indexterm>
307 </listitem>
308 </varlistentry>
309
310 <varlistentry id="ssh">
311 <term><command>ssh</command></term>
312 <listitem>
313 <para>is an <command>rlogin</command>/<command>rsh</command>-like
314 client program except it uses an encrypted protocol.</para>
315 <indexterm zone="openssh ssh">
316 <primary sortas="b-ssh">ssh</primary>
317 </indexterm>
318 </listitem>
319 </varlistentry>
320
321 <varlistentry id="sshd">
322 <term><command>sshd</command></term>
323 <listitem>
324 <para>is a daemon that listens for <command>ssh</command> login
325 requests.</para>
326 <indexterm zone="openssh sshd">
327 <primary sortas="b-sshd">sshd</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331
332 <varlistentry id="ssh-add">
333 <term><command>ssh-add</command></term>
334 <listitem>
335 <para>is a tool which adds keys to the
336 <command>ssh-agent</command>.</para>
337 <indexterm zone="openssh ssh-add">
338 <primary sortas="b-ssh-add">ssh-add</primary>
339 </indexterm>
340 </listitem>
341 </varlistentry>
342
343 <varlistentry id="ssh-agent">
344 <term><command>ssh-agent</command></term>
345 <listitem>
346 <para>is an authentication agent that can store private keys.</para>
347 <indexterm zone="openssh ssh-agent">
348 <primary sortas="b-ssh-agent">ssh-agent</primary>
349 </indexterm>
350 </listitem>
351 </varlistentry>
352
353 <varlistentry id="ssh-keygen">
354 <term><command>ssh-keygen</command></term>
355 <listitem>
356 <para>is a key generation tool.</para>
357 <indexterm zone="openssh ssh-keygen">
358 <primary sortas="b-ssh-keygen">ssh-keygen</primary>
359 </indexterm>
360 </listitem>
361 </varlistentry>
362
363 <varlistentry id="ssh-keyscan">
364 <term><command>ssh-keyscan</command></term>
365 <listitem>
366 <para>is a utility for gathering public host keys from a
367 number of hosts.</para>
368 <indexterm zone="openssh ssh-keyscan">
369 <primary sortas="b-ssh-keyscan">ssh-keyscan</primary>
370 </indexterm>
371 </listitem>
372 </varlistentry>
373
374 <varlistentry id="ssh-keysign">
375 <term><command>ssh-keysign</command></term>
376 <listitem>
377 <para>is used by <command>ssh</command> to access the local host
378 keys and generate the digital signature required during hostbased
379 authentication with SSH protocol version 2. This program is not normally
380 called directly by the user.</para>
381 <indexterm zone="openssh ssh-keysign">
382 <primary sortas="b-ssh-keysign">ssh-keysign</primary>
383 </indexterm>
384 </listitem>
385 </varlistentry>
386
387 </variablelist>
388
389 </sect2>
390
391</sect1>
Note: See TracBrowser for help on using the repository browser.