source: server/major/openssh.xml@ 8f9c757e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 8f9c757e was b66ece35, checked in by DJ Lucas <dj@…>, 14 years ago

Update all jdk links to include optional IcedTea6 links.

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

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