source: server/major/openssh.xml@ 7c9e252

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 7c9e252 was 7c9e252, checked in by DJ Lucas <dj@…>, 16 years ago

Corrected OpenSSH testsuite errors

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@7186 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. Additionally, the testsuite requires an installed
120 copy of <command>scp</command> to complete the mulitplexing tests. To
121 run the test suite, issue the following commnds as the
122 <systemitem class="username">root</systemitem> user:</para>
123
124<screen role="root"><userinput>if test -f /usr/bin/scp
125then
126 mv /usr/bin/scp /usr/bin/scp-bak
127fi &amp;&amp;
128cp scp /usr/bin/scp &amp;&amp;
129make tests 2&gt;&amp;1 | tee check.log
130grep "FATAL" check.log</userinput></screen>
131
132 <para>If the above command produces no 'FATAL' errors, then proceed
133 with the installation, again as the
134 <systemitem class="username">root</systemitem> user:</para>
135
136<screen role="root"><userinput>rm /usr/bin/scp &amp;&amp;
137if test -f /usr/bin/scp-bak
138then
139 rm /usr/bin/scp-bak
140fi &amp;&amp;
141make install &amp;&amp;
142install -v -m755 -d /usr/share/doc/openssh-&openssh-version; &amp;&amp;
143install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \
144 /usr/share/doc/openssh-&openssh-version;</userinput></screen>
145
146 </sect2>
147
148 <sect2 role="commands">
149 <title>Command Explanations</title>
150
151 <para><command>sed -i 's@ -ldes@@' configure</command>:
152 This command fixes a build crash if you used the
153 <option>--with-kerberos5</option> parameter and you built the
154 <application>Heimdal</application> package in accordance with the BLFS
155 instructions. The command is harmless in all other instances.</para>
156
157 <para><parameter>--sysconfdir=/etc/ssh</parameter>: This prevents
158 the configuration files from being installed in
159 <filename class="directory">/usr/etc</filename>.</para>
160
161 <para><parameter>--datadir=/usr/share/sshd</parameter>: This switch
162 puts the Ssh.bin file (used for SmartCard authentication) in
163 <filename class="directory">/usr/share/sshd</filename>.</para>
164
165<!-- WOW, this description is really old, IIRC it was obsolete shortly
166 before I was an editor, as the hint became a part of both books.
167 I'll leave it in for now JIC - Delete Later
168 <para><parameter>- -with-md5-passwords</parameter>: This is required
169 if you made the changes recommended by the shadowpasswd_plus
170 LFS hint on your SSH server when you installed the Shadow Password
171 Suite or if you access a SSH server that authenticates by
172 user passwords encrypted with md5.</para>
173-->
174
175 <para><parameter>--with-md5-passwords</parameter>: This is required
176 with the default configuration of Shadow password suite in LFS.</para>
177
178 <para><parameter>--libexecdir=/usr/lib/openssh</parameter>: This parameter
179 changes the installation path of some programs to
180 <filename class="directory">/usr/lib/openssh</filename> instead of
181 <filename class="directory">/usr/libexec</filename>.</para>
182
183 <para><parameter>--with-pam</parameter>: This parameter enables
184 <application>Linux-PAM</application> support in the build.</para>
185
186 </sect2>
187
188 <sect2 role="configuration">
189 <title>Configuring OpenSSH</title>
190
191 <sect3 id="openssh-config">
192 <title>Config Files</title>
193
194 <para><filename>~/.ssh/*</filename>,
195 <filename>/etc/ssh/ssh_config</filename>, and
196 <filename>/etc/ssh/sshd_config</filename></para>
197
198 <indexterm zone="openssh openssh-config">
199 <primary sortas="e-AA.ssh">~/.ssh/*</primary>
200 </indexterm>
201
202 <indexterm zone="openssh openssh-config">
203 <primary sortas="e-etc-ssh-ssh_config">/etc/ssh/ssh_config</primary>
204 </indexterm>
205
206 <indexterm zone="openssh openssh-config">
207 <primary sortas="e-etc-ssh-sshd_config">/etc/ssh/sshd_config</primary>
208 </indexterm>
209
210 <para>There are no required changes to any of these files. However,
211 you may wish to view the <filename class='directory'>/etc/ssh/</filename>
212 files and make any changes appropriate for the security of your system.
213 One recommended change is that you disable
214 <systemitem class='username'>root</systemitem> login via
215 <command>ssh</command>. Execute the following command as the
216 <systemitem class='username'>root</systemitem> user to disable
217 <systemitem class='username'>root</systemitem> login via
218 <command>ssh</command>:</para>
219
220<screen role="root"><userinput>echo "PermitRootLogin no" &gt;&gt; /etc/ssh/sshd_config</userinput></screen>
221
222 <para>If you added <application>LinuxPAM</application> support, then you
223 will need to add a configuration file for
224 <application>sshd</application>. Issue the following commands as the
225 <systemitem class='username'>root</systemitem> user:</para>
226
227<screen role="root"><userinput>sed 's@d/login@d/sshd@g' /etc/pam.d/login &gt; /etc/pam.d/sshd &amp;&amp;
228chmod 644 /etc/pam.d/sshd</userinput></screen>
229
230 <para>Additional configuration information can be found in the man
231 pages for <command>sshd</command>, <command>ssh</command> and
232 <command>ssh-agent</command>.</para>
233
234 </sect3>
235
236 <sect3 id="openssh-init">
237 <title>Boot Script</title>
238
239 <para>To start the SSH server at system boot, install the
240 <filename>/etc/rc.d/init.d/sshd</filename> init script included
241 in the <xref linkend="bootscripts"/> package.</para>
242
243 <indexterm zone="openssh openssh-init">
244 <primary sortas="f-sshd">sshd</primary>
245 </indexterm>
246
247<screen role="root"><userinput>make install-sshd</userinput></screen>
248
249 </sect3>
250
251 </sect2>
252
253 <sect2 role="content">
254 <title>Contents</title>
255
256 <segmentedlist>
257 <segtitle>Installed Programs</segtitle>
258 <segtitle>Installed Libraries</segtitle>
259 <segtitle>Installed Directories</segtitle>
260
261 <seglistitem>
262 <seg>scp, sftp, sftp-server, slogin, ssh, sshd, ssh-add, ssh-agent,
263 ssh-keygen, ssh-keyscan, and ssh-keysign</seg>
264 <seg>None</seg>
265 <seg>/etc/ssh, /var/lib/sshd and
266 /usr/share/doc/openssh-&openssh-version;</seg>
267 </seglistitem>
268 </segmentedlist>
269
270 <variablelist>
271 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
272 <?dbfo list-presentation="list"?>
273 <?dbhtml list-presentation="table"?>
274
275 <varlistentry id="scp">
276 <term><command>scp</command></term>
277 <listitem>
278 <para>is a file copy program that acts like <command>rcp</command>
279 except it uses an encrypted protocol.</para>
280 <indexterm zone="openssh scp">
281 <primary sortas="b-scp">scp</primary>
282 </indexterm>
283 </listitem>
284 </varlistentry>
285
286 <varlistentry id="sftp">
287 <term><command>sftp</command></term>
288 <listitem>
289 <para>is an FTP-like program that works over
290 SSH1 and SSH2 protocols.</para>
291 <indexterm zone="openssh sftp">
292 <primary sortas="b-sftp">sftp</primary>
293 </indexterm>
294 </listitem>
295 </varlistentry>
296
297 <varlistentry id="sftp-server">
298 <term><command>sftp-server</command></term>
299 <listitem>
300 <para>is an SFTP server subsystem. This program is not normally
301 called directly by the user.</para>
302 <indexterm zone="openssh sftp-server">
303 <primary sortas="b-sftp-server">sftp-server</primary>
304 </indexterm>
305 </listitem>
306 </varlistentry>
307
308 <varlistentry id="slogin">
309 <term><command>slogin</command></term>
310 <listitem>
311 <para>is a symlink to <command>ssh</command>.</para>
312 <indexterm zone="openssh slogin">
313 <primary sortas="g-slogin">slogin</primary>
314 </indexterm>
315 </listitem>
316 </varlistentry>
317
318 <varlistentry id="ssh">
319 <term><command>ssh</command></term>
320 <listitem>
321 <para>is an <command>rlogin</command>/<command>rsh</command>-like
322 client program except it uses an encrypted protocol.</para>
323 <indexterm zone="openssh ssh">
324 <primary sortas="b-ssh">ssh</primary>
325 </indexterm>
326 </listitem>
327 </varlistentry>
328
329 <varlistentry id="sshd">
330 <term><command>sshd</command></term>
331 <listitem>
332 <para>is a daemon that listens for <command>ssh</command> login
333 requests.</para>
334 <indexterm zone="openssh sshd">
335 <primary sortas="b-sshd">sshd</primary>
336 </indexterm>
337 </listitem>
338 </varlistentry>
339
340 <varlistentry id="ssh-add">
341 <term><command>ssh-add</command></term>
342 <listitem>
343 <para>is a tool which adds keys to the
344 <command>ssh-agent</command>.</para>
345 <indexterm zone="openssh ssh-add">
346 <primary sortas="b-ssh-add">ssh-add</primary>
347 </indexterm>
348 </listitem>
349 </varlistentry>
350
351 <varlistentry id="ssh-agent">
352 <term><command>ssh-agent</command></term>
353 <listitem>
354 <para>is an authentication agent that can store private keys.</para>
355 <indexterm zone="openssh ssh-agent">
356 <primary sortas="b-ssh-agent">ssh-agent</primary>
357 </indexterm>
358 </listitem>
359 </varlistentry>
360
361 <varlistentry id="ssh-keygen">
362 <term><command>ssh-keygen</command></term>
363 <listitem>
364 <para>is a key generation tool.</para>
365 <indexterm zone="openssh ssh-keygen">
366 <primary sortas="b-ssh-keygen">ssh-keygen</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry id="ssh-keyscan">
372 <term><command>ssh-keyscan</command></term>
373 <listitem>
374 <para>is a utility for gathering public host keys from a
375 number of hosts.</para>
376 <indexterm zone="openssh ssh-keyscan">
377 <primary sortas="b-ssh-keyscan">ssh-keyscan</primary>
378 </indexterm>
379 </listitem>
380 </varlistentry>
381
382 <varlistentry id="ssh-keysign">
383 <term><command>ssh-keysign</command></term>
384 <listitem>
385 <para>is used by <command>ssh</command> to access the local host
386 keys and generate the digital signature required during hostbased
387 authentication with SSH protocol version 2. This program is not normally
388 called directly by the user.</para>
389 <indexterm zone="openssh ssh-keysign">
390 <primary sortas="b-ssh-keysign">ssh-keysign</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 </variablelist>
396
397 </sect2>
398
399</sect1>
Note: See TracBrowser for help on using the repository browser.