source: server/major/openssh.xml@ b66ece35

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 b66ece35 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
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://ftp.openbsd.org/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 "13563dbf61f36ca9a1e4254260131041">
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)">
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 <ulink url="http://www.thrysoee.dk/editline/">libedit</ulink>
70 (provides a command-line history feature to <command>sftp</command>),
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 <bridgehead renderas="sect4">Optional Runtime (Used only to gather entropy)</bridgehead>
76 <para role="optional"><xref linkend="icedtea6"/> or <xref linkend="jdk"/>,
77 <xref linkend="net-tools"/>, and
78 <xref linkend="sysstat"/>.</para>
79
80 <para condition="html" role="usernotes">User Notes:
81 <ulink url='&blfs-wiki;/OpenSSH'/></para>
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
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>
95
96<screen role="root"><userinput>install -v -m700 -d /var/lib/sshd &amp;&amp;
97chown -v root:sys /var/lib/sshd &amp;&amp;
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>
101
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 start up. 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>
108
109<screen><userinput>sed -i 's@-lcrypto@/usr/lib/libcrypto.a -ldl@' configure</userinput></screen>
110
111 <para>Install <application>OpenSSH</application> by running
112 the following commands:</para>
113
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;
121make</userinput></screen>
122
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
127 test suite will fail. Additionally, the testsuite requires an installed
128 copy of <command>scp</command> to complete the multiplexing tests. To
129 run the test suite, first copy the scp program to
130 <filename class="directory">/usr/bin</filename>, making sure that you
131 back up any existing copy first.</para>
132
133 <para>To run the test suite, issue the following commands:</para>
134
135<screen role="root"><userinput>make tests 2&gt;&amp;1 | tee check.log
136grep FATAL check.log</userinput></screen>
137
138 <para>If the above command produces no 'FATAL' errors, then proceed
139 with the installation, as the
140 <systemitem class="username">root</systemitem> user:</para>
141
142<screen role="root"><userinput>make install &amp;&amp;
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>
146
147 </sect2>
148
149 <sect2 role="commands">
150 <title>Command Explanations</title>
151
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
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>
161
162 <para><parameter>--datadir=/usr/share/sshd</parameter>: This switch
163 puts the Ssh.bin file (used for SmartCard authentication) in
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>
168
169 <para><parameter>--libexecdir=/usr/lib/openssh</parameter>: This parameter
170 changes the installation path of some programs to
171 <filename class="directory">/usr/lib/openssh</filename> instead of
172 <filename class="directory">/usr/libexec</filename>.</para>
173
174 <para><parameter>--with-pam</parameter>: This parameter enables
175 <application>Linux-PAM</application> support in the build.</para>
176
177 <para><parameter>--with-xauth=/usr/bin/xauth</parameter>: Set the
178 default location for the <command>xauth</command> binary for X
179 authentication. Change the location if <command>xauth</command> will
180 be installed to a different path. This can also be controlled from
181 <filename>sshd_config</filename> with the XAuthLocation keyword.
182 You can omit this switch if <application>Xorg</application> is already
183 installed.
184 </para>
185
186 <para><parameter>--with-kerberos5=/usr</parameter>: This option is used to
187 include Heimdal support in the build.</para>
188
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>
215 files and make any changes appropriate for the security of your system.
216 One recommended change is that you disable
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
221 <command>ssh</command>:</para>
222
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
226 will need to add a configuration file for
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>
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
244 in the <xref linkend="bootscripts"/> package.</para>
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>
268 <seg>/etc/ssh, /var/lib/sshd, /usr/lib/openssh, and
269 /usr/share/doc/openssh-&openssh-version;</seg>
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>
303 <para>is an SFTP server subsystem. This program is not normally
304 called directly by the user.</para>
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
390 authentication with SSH protocol version 2. This program is not normally
391 called directly by the user.</para>
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.