source: server/major/openssh.xml@ d4bf650a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 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 gimp3 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/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since d4bf650a was 618b9a7, checked in by Ag Hatzimanikas <ag@…>, 17 years ago

Fixed typos

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

  • Property mode set to 100644
File size: 15.4 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"/>,
[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
[1663c2b5]75 <para condition="html" role="usernotes">User Notes:
76 <ulink url='&blfs-wiki;/OpenSSH'/></para>
[e4e0d060]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
[3de6059]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>
[e4e0d060]90
[45f3870]91<screen role="root"><userinput>install -v -m700 -d /var/lib/sshd &amp;&amp;
92chown -v root:sys /var/lib/sshd &amp;&amp;
[b21c661]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>
[0931098]96
[e4e0d060]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>
[0931098]103
[6c24da75]104<screen><userinput>sed -i 's@-lcrypto@/usr/lib/libcrypto.a -ldl@' configure</userinput></screen>
[0931098]105
[e4e0d060]106 <para>Install <application>OpenSSH</application> by running
107 the following commands:</para>
[0931098]108
[6c24da75]109<screen><userinput>sed -i 's@ -ldes@@' configure &amp;&amp;
110./configure --prefix=/usr --sysconfdir=/etc/ssh --datadir=/usr/share/sshd \
[03fea94]111 --libexecdir=/usr/lib/openssh --with-md5-passwords \
[4ea98296]112 --with-privsep-path=/var/lib/sshd \
113 --with-xauth=/usr/bin/xauth &amp;&amp;
[3a3b19b]114make</userinput></screen>
[1b83a7c1]115
[e4e0d060]116 <para>If you linked <application>tcp_wrappers</application> into the
117 build using the <option>--with-tcp-wrappers</option> parameter, ensure
118 you add 127.0.0.1 to the sshd line in <filename>/etc/hosts.allow</filename>
119 if you have a restrictive <filename>/etc/hosts.deny</filename> file, or the
[7c9e252]120 test suite will fail. Additionally, the testsuite requires an installed
121 copy of <command>scp</command> to complete the mulitplexing tests. To
122 run the test suite, issue the following commnds as the
123 <systemitem class="username">root</systemitem> user:</para>
124
125<screen role="root"><userinput>if test -f /usr/bin/scp
126then
127 mv /usr/bin/scp /usr/bin/scp-bak
128fi &amp;&amp;
129cp scp /usr/bin/scp &amp;&amp;
130make tests 2&gt;&amp;1 | tee check.log
131grep "FATAL" check.log</userinput></screen>
132
133 <para>If the above command produces no 'FATAL' errors, then proceed
134 with the installation, again as the
135 <systemitem class="username">root</systemitem> user:</para>
136
137<screen role="root"><userinput>rm /usr/bin/scp &amp;&amp;
138if test -f /usr/bin/scp-bak
139then
140 rm /usr/bin/scp-bak
141fi &amp;&amp;
142make 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
[6c24da75]152 <para><command>sed -i 's@ -ldes@@' configure</command>:
[3a3b19b]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
163 puts the Ssh.bin file (used for SmartCard authentication) in
164 <filename class="directory">/usr/share/sshd</filename>.</para>
165
166<!-- WOW, this description is really old, IIRC it was obsolete shortly
167 before I was an editor, as the hint became a part of both books.
168 I'll leave it in for now JIC - Delete Later
169 <para><parameter>- -with-md5-passwords</parameter>: This is required
[e4e0d060]170 if you made the changes recommended by the shadowpasswd_plus
171 LFS hint on your SSH server when you installed the Shadow Password
172 Suite or if you access a SSH server that authenticates by
173 user passwords encrypted with md5.</para>
[6c24da75]174-->
175
176 <para><parameter>--with-md5-passwords</parameter>: This is required
177 with the default configuration of Shadow password suite in LFS.</para>
[e4e0d060]178
[1b744785]179 <para><parameter>--libexecdir=/usr/lib/openssh</parameter>: This parameter
[e4e0d060]180 changes the installation path of some programs to
[1b744785]181 <filename class="directory">/usr/lib/openssh</filename> instead of
[e4e0d060]182 <filename class="directory">/usr/libexec</filename>.</para>
183
[ba7a0ce]184 <para><parameter>--with-pam</parameter>: This parameter enables
185 <application>Linux-PAM</application> support in the build.</para>
186
[4ea98296]187 <para><parameter>--with-xauth=/usr/bin/xauth</parameter>: Set the
188 default location for the <command>xauth</command> binary for X
189 authentication. Change the location if <command>xauth</command> will
190 be installed to a different path. This can also be controlled from
191 <filename>sshd_config</filename> with the XAuthLocation keyword.
[618b9a7]192 You can omit this switch if <application>Xorg</application> is already
[4ea98296]193 installed.
194 </para>
195
[e4e0d060]196 </sect2>
197
198 <sect2 role="configuration">
199 <title>Configuring OpenSSH</title>
200
201 <sect3 id="openssh-config">
202 <title>Config Files</title>
203
204 <para><filename>~/.ssh/*</filename>,
205 <filename>/etc/ssh/ssh_config</filename>, and
206 <filename>/etc/ssh/sshd_config</filename></para>
207
208 <indexterm zone="openssh openssh-config">
209 <primary sortas="e-AA.ssh">~/.ssh/*</primary>
210 </indexterm>
211
212 <indexterm zone="openssh openssh-config">
213 <primary sortas="e-etc-ssh-ssh_config">/etc/ssh/ssh_config</primary>
214 </indexterm>
215
216 <indexterm zone="openssh openssh-config">
217 <primary sortas="e-etc-ssh-sshd_config">/etc/ssh/sshd_config</primary>
218 </indexterm>
219
220 <para>There are no required changes to any of these files. However,
221 you may wish to view the <filename class='directory'>/etc/ssh/</filename>
[823b1a3]222 files and make any changes appropriate for the security of your system.
[bfb7882]223 One recommended change is that you disable
[823b1a3]224 <systemitem class='username'>root</systemitem> login via
225 <command>ssh</command>. Execute the following command as the
226 <systemitem class='username'>root</systemitem> user to disable
227 <systemitem class='username'>root</systemitem> login via
[e4e0d060]228 <command>ssh</command>:</para>
229
[6c24da75]230<screen role="root"><userinput>echo "PermitRootLogin no" &gt;&gt; /etc/ssh/sshd_config</userinput></screen>
231
232 <para>If you added <application>LinuxPAM</application> support, then you
233 will need to add a configuration file for
234 <application>sshd</application>. Issue the following commands as the
235 <systemitem class='username'>root</systemitem> user:</para>
236
237<screen role="root"><userinput>sed 's@d/login@d/sshd@g' /etc/pam.d/login &gt; /etc/pam.d/sshd &amp;&amp;
238chmod 644 /etc/pam.d/sshd</userinput></screen>
[e4e0d060]239
240 <para>Additional configuration information can be found in the man
241 pages for <command>sshd</command>, <command>ssh</command> and
242 <command>ssh-agent</command>.</para>
243
244 </sect3>
245
246 <sect3 id="openssh-init">
247 <title>Boot Script</title>
248
249 <para>To start the SSH server at system boot, install the
250 <filename>/etc/rc.d/init.d/sshd</filename> init script included
[5254d12]251 in the <xref linkend="bootscripts"/> package.</para>
[e4e0d060]252
253 <indexterm zone="openssh openssh-init">
254 <primary sortas="f-sshd">sshd</primary>
255 </indexterm>
256
257<screen role="root"><userinput>make install-sshd</userinput></screen>
258
259 </sect3>
260
261 </sect2>
262
263 <sect2 role="content">
264 <title>Contents</title>
265
266 <segmentedlist>
267 <segtitle>Installed Programs</segtitle>
268 <segtitle>Installed Libraries</segtitle>
269 <segtitle>Installed Directories</segtitle>
270
271 <seglistitem>
272 <seg>scp, sftp, sftp-server, slogin, ssh, sshd, ssh-add, ssh-agent,
273 ssh-keygen, ssh-keyscan, and ssh-keysign</seg>
274 <seg>None</seg>
[45f3870]275 <seg>/etc/ssh, /var/lib/sshd and
276 /usr/share/doc/openssh-&openssh-version;</seg>
[e4e0d060]277 </seglistitem>
278 </segmentedlist>
279
280 <variablelist>
281 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
282 <?dbfo list-presentation="list"?>
283 <?dbhtml list-presentation="table"?>
284
285 <varlistentry id="scp">
286 <term><command>scp</command></term>
287 <listitem>
288 <para>is a file copy program that acts like <command>rcp</command>
289 except it uses an encrypted protocol.</para>
290 <indexterm zone="openssh scp">
291 <primary sortas="b-scp">scp</primary>
292 </indexterm>
293 </listitem>
294 </varlistentry>
295
296 <varlistentry id="sftp">
297 <term><command>sftp</command></term>
298 <listitem>
299 <para>is an FTP-like program that works over
300 SSH1 and SSH2 protocols.</para>
301 <indexterm zone="openssh sftp">
302 <primary sortas="b-sftp">sftp</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 <varlistentry id="sftp-server">
308 <term><command>sftp-server</command></term>
309 <listitem>
[0c6194bb]310 <para>is an SFTP server subsystem. This program is not normally
311 called directly by the user.</para>
[e4e0d060]312 <indexterm zone="openssh sftp-server">
313 <primary sortas="b-sftp-server">sftp-server</primary>
314 </indexterm>
315 </listitem>
316 </varlistentry>
317
318 <varlistentry id="slogin">
319 <term><command>slogin</command></term>
320 <listitem>
321 <para>is a symlink to <command>ssh</command>.</para>
322 <indexterm zone="openssh slogin">
323 <primary sortas="g-slogin">slogin</primary>
324 </indexterm>
325 </listitem>
326 </varlistentry>
327
328 <varlistentry id="ssh">
329 <term><command>ssh</command></term>
330 <listitem>
331 <para>is an <command>rlogin</command>/<command>rsh</command>-like
332 client program except it uses an encrypted protocol.</para>
333 <indexterm zone="openssh ssh">
334 <primary sortas="b-ssh">ssh</primary>
335 </indexterm>
336 </listitem>
337 </varlistentry>
338
339 <varlistentry id="sshd">
340 <term><command>sshd</command></term>
341 <listitem>
342 <para>is a daemon that listens for <command>ssh</command> login
343 requests.</para>
344 <indexterm zone="openssh sshd">
345 <primary sortas="b-sshd">sshd</primary>
346 </indexterm>
347 </listitem>
348 </varlistentry>
349
350 <varlistentry id="ssh-add">
351 <term><command>ssh-add</command></term>
352 <listitem>
353 <para>is a tool which adds keys to the
354 <command>ssh-agent</command>.</para>
355 <indexterm zone="openssh ssh-add">
356 <primary sortas="b-ssh-add">ssh-add</primary>
357 </indexterm>
358 </listitem>
359 </varlistentry>
360
361 <varlistentry id="ssh-agent">
362 <term><command>ssh-agent</command></term>
363 <listitem>
364 <para>is an authentication agent that can store private keys.</para>
365 <indexterm zone="openssh ssh-agent">
366 <primary sortas="b-ssh-agent">ssh-agent</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry id="ssh-keygen">
372 <term><command>ssh-keygen</command></term>
373 <listitem>
374 <para>is a key generation tool.</para>
375 <indexterm zone="openssh ssh-keygen">
376 <primary sortas="b-ssh-keygen">ssh-keygen</primary>
377 </indexterm>
378 </listitem>
379 </varlistentry>
380
381 <varlistentry id="ssh-keyscan">
382 <term><command>ssh-keyscan</command></term>
383 <listitem>
384 <para>is a utility for gathering public host keys from a
385 number of hosts.</para>
386 <indexterm zone="openssh ssh-keyscan">
387 <primary sortas="b-ssh-keyscan">ssh-keyscan</primary>
388 </indexterm>
389 </listitem>
390 </varlistentry>
391
392 <varlistentry id="ssh-keysign">
393 <term><command>ssh-keysign</command></term>
394 <listitem>
395 <para>is used by <command>ssh</command> to access the local host
396 keys and generate the digital signature required during hostbased
[0c6194bb]397 authentication with SSH protocol version 2. This program is not normally
398 called directly by the user.</para>
[e4e0d060]399 <indexterm zone="openssh ssh-keysign">
400 <primary sortas="b-ssh-keysign">ssh-keysign</primary>
401 </indexterm>
402 </listitem>
403 </varlistentry>
404
405 </variablelist>
406
407 </sect2>
408
409</sect1>
Note: See TracBrowser for help on using the repository browser.