source: server/other/openssh.xml@ cc7ffff

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 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 cc7ffff was cc7ffff, checked in by Randy McMurchy <randy@…>, 19 years ago

Reworded the config section in the OpenSSH instructions

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

  • Property mode set to 100644
File size: 11.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/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 "7b36f28fc16e1b7f4ba3c1dca191ac92">
10<!ENTITY openssh-size "889 KB">
11<!ENTITY openssh-buildsize "14.5 MB">
12<!ENTITY openssh-time "0.42 SBU">
13]>
14
15<sect1 id="openssh" xreflabel="OpenSSH-&openssh-version;">
16<sect1info>
17<othername>$LastChangedBy$</othername>
18<date>$Date$</date>
19</sect1info>
20<?dbhtml filename="openssh.html"?>
21<title>Open<acronym>SSH</acronym>-&openssh-version;</title>
22<indexterm zone="openssh">
23<primary sortas="a-OpenSSH">OpenSSH</primary></indexterm>
24
25<sect2>
26<title>Introduction to
27<application>Open<acronym>SSH</acronym></application></title>
28
29<para>The <application>Open<acronym>SSH</acronym></application> package
30contains <command>ssh</command> clients and the <command>sshd</command> daemon.
31This is useful for encrypting authentication and subsequent traffic over a
32network.</para>
33
34<sect3><title>Package information</title>
35<itemizedlist spacing='compact'>
36<listitem><para>Download (HTTP):
37<ulink url="&openssh-download-http;"/></para></listitem>
38<listitem><para>Download (FTP):
39<ulink url="&openssh-download-ftp;"/></para></listitem>
40<listitem><para>Download MD5 sum: &openssh-md5sum;</para></listitem>
41<listitem><para>Download size: &openssh-size;</para></listitem>
42<listitem><para>Estimated disk space required:
43&openssh-buildsize;</para></listitem>
44<listitem><para>Estimated build time:
45&openssh-time;</para></listitem></itemizedlist>
46</sect3>
47
48<sect3><title><application>Open<acronym>SSH</acronym></application>
49dependencies</title>
50<sect4><title>Required</title>
51<para><xref linkend="openssl"/></para>
52</sect4>
53
54<sect4><title>Optional</title>
55<para><xref linkend="Linux_PAM"/>,
56<xref linkend="tcpwrappers"/>,
57X (<xref linkend="xfree86"/> or <xref linkend="xorg"/>),
58<xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
59<xref linkend="j2sdk"/>,
60<xref linkend="net-tools"/>,
61<ulink url="http://www.opensc.org/">OpenSC</ulink> and
62<ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink></para>
63</sect4>
64</sect3>
65
66</sect2>
67
68<sect2>
69<title>Installation of
70<application>Open<acronym>SSH</acronym></application></title>
71
72<para><application>Open<acronym>SSH</acronym></application> runs as two
73processes when connecting to other computers. The first process is a
74privileged process and controls the issuance of privileges as necessary.
75The second process communicates with the network. Additional installation
76steps are necessary to set up the proper environment, which are performed
77by the following commands:</para>
78
79<screen><userinput><command>install -v -d -m700 /var/lib/sshd &amp;&amp;
80chown root:sys /var/lib/sshd &amp;&amp;
81groupadd sshd &amp;&amp;
82useradd -c 'sshd PrivSep' -d /var/lib/sshd -g sshd -s /bin/false sshd</command></userinput></screen>
83
84<para><application>OpenSSH</application> is very sensitive to changes in the
85linked <application>OpenSSL</application> libraries. If you recompile
86<application>OpenSSL</application>, <application>OpenSSH</application> may
87fail to startup. An alternative is to link against the static
88<application>OpenSSL</application> library. To link against the static
89library, execute the following command:</para>
90
91<screen><userinput><command>sed -i "s:-lcrypto:/usr/lib/libcrypto.a:g" configure</command></userinput></screen>
92
93<para>Install <application>Open<acronym>SSH</acronym></application> by running
94the following commands:</para>
95
96<screen><userinput><command>./configure --prefix=/usr --sysconfdir=/etc/ssh \
97 --libexecdir=/usr/sbin --with-md5-passwords \
98 --with-privsep-path=/var/lib/sshd</command></userinput></screen>
99
100<para>If you use <application>Heimdal</application> as your Kerberos5
101implementation and you linked the <application>Heimdal</application> libraries
102into the build using the <option>--with-kerberos5</option> parameter, you'll
103need to modify the <filename>Makefile</filename> or the build will fail. Use
104the following command:</para>
105
106<screen><userinput><command>sed -i -e "s/lkrb5 -ldes/lkrb5/" Makefile</command></userinput></screen>
107
108<para>Continue the build:</para>
109
110<screen><userinput><command>make</command></userinput></screen>
111
112<para>If you linked <application>tcp_wrappers</application> into the build
113using the <option>--with-tcp-wrappers</option> parameter, ensure you add
114127.0.0.1 to the sshd line in <filename>/etc/hosts.allow</filename> if you
115have a restrictive <filename>/etc/hosts.deny</filename> file, or the testsuite
116will fail. To run the testsuite, issue: <command>make -k
117tests</command>.</para>
118
119<para>Now, as the root user:</para>
120
121<screen><userinput role='root'><command>make install</command></userinput></screen>
122
123</sect2>
124
125<sect2>
126<title>Command explanations</title>
127
128<para><parameter>--sysconfdir=/etc/ssh</parameter>: This prevents the
129configuration files from being installed in
130<filename class="directory">/usr/etc</filename>.</para>
131
132<para><parameter>--with-md5-passwords</parameter>: This is required
133if you made the changes recommended by the shadowpasswd_plus
134<acronym>LFS</acronym> hint on
135your <acronym>SSH</acronym> server when you installed the Shadow Password
136Suite or if you access a <acronym>SSH</acronym> server that authenticates by
137user passwords encrypted with md5. </para>
138
139<para><parameter>--libexecdir=/usr/sbin</parameter>: This parameter
140changes the installation path of some programs to
141<filename class="directory">/usr/sbin</filename> instead of
142<filename class="directory">/usr/libexec</filename>.</para>
143
144</sect2>
145
146<sect2>
147<title>Configuring <application>Open<acronym>SSH</acronym></application></title>
148
149<sect3 id="openssh-config"><title>Config files</title>
150
151<para><filename>~/.ssh/*, /etc/ssh/ssh_config</filename> and
152<filename>/etc/ssh/sshd_config</filename></para>
153<indexterm zone="openssh openssh-config">
154<primary sortas="e-AA.ssh">~/.ssh/*</primary></indexterm>
155<indexterm zone="openssh openssh-config">
156<primary sortas="e-etc-ssh-ssh_config">/etc/ssh/ssh_config</primary>
157</indexterm>
158<indexterm zone="openssh openssh-config">
159<primary sortas="e-etc-ssh-sshd_config">/etc/ssh/sshd_config</primary>
160</indexterm>
161
162<para>There are no required changes to any of these files. However,
163you may wish to view the <filename class='directory'>/etc/ssh/</filename>
164files and make any changes appropriate for the security of your system. One
165recomended change is that you disable root login via <command>ssh</command>.
166Execute the following command to disable root login via
167<command>ssh</command>:</para>
168
169<screen><userinput><command>echo "PermitRootLogin no" >> /etc/ssh/sshd_config</command></userinput></screen>
170
171<para>Additional configuration information can be found in the man pages for
172<command>sshd</command>, <command>ssh</command> and
173<command>ssh-agent</command>.</para>
174</sect3>
175
176<sect3 id="openssh-init"><title>sshd init.d script</title>
177
178<para>To start the <acronym>SSH</acronym> server at system boot, install the
179<filename>/etc/rc.d/init.d/sshd</filename> init script included in the
180<xref linkend="intro-important-bootscripts"/> package.</para>
181<indexterm zone="openssh openssh-init">
182<primary sortas="f-sshd">sshd</primary></indexterm>
183
184<screen><userinput><command>make install-sshd</command></userinput></screen>
185</sect3>
186
187</sect2>
188
189<sect2>
190<title>Contents</title>
191
192<segmentedlist>
193<segtitle>Installed Programs</segtitle>
194<segtitle>Installed Libraries</segtitle>
195<segtitle>Installed Directories</segtitle>
196
197<seglistitem>
198<seg>scp, sftp, sftp-server, slogin, ssh, sshd, ssh-add, ssh-agent,
199ssh-keygen, ssh-keyscan and ssh-keysign</seg>
200<seg>None</seg>
201<seg>/etc/ssh and /var/lib/sshd</seg>
202</seglistitem>
203</segmentedlist>
204
205<variablelist>
206<bridgehead renderas="sect3">Short Descriptions</bridgehead>
207<?dbfo list-presentation="list"?>
208
209<varlistentry id="scp">
210<term><command>scp</command></term>
211<listitem><para>is a file copy program that acts like <command>rcp</command>
212except it uses an encrypted protocol.</para>
213<indexterm zone="openssh scp">
214<primary sortas="b-scp">scp</primary>
215</indexterm></listitem>
216</varlistentry>
217
218<varlistentry id="sftp">
219<term><command>sftp</command></term>
220<listitem><para>is an <acronym>FTP</acronym>-like program that works over
221<acronym>SSH</acronym>1 and <acronym>SSH</acronym>2 protocols.</para>
222<indexterm zone="openssh sftp">
223<primary sortas="b-sftp">sftp</primary>
224</indexterm></listitem>
225</varlistentry>
226
227<varlistentry id="sftp-server">
228<term><command>sftp-server</command></term>
229<listitem><para>is an <acronym>SFTP</acronym> server subsystem.</para>
230<indexterm zone="openssh sftp-server">
231<primary sortas="b-sftp-server">sftp-server</primary>
232</indexterm></listitem>
233</varlistentry>
234
235<varlistentry id="slogin">
236<term><command>slogin</command></term>
237<listitem><para>is a symlink to <command>ssh</command>.</para>
238<indexterm zone="openssh slogin">
239<primary sortas="g-slogin">slogin</primary>
240</indexterm></listitem>
241</varlistentry>
242
243<varlistentry id="ssh">
244<term><command>ssh</command></term>
245<listitem><para>is an <command>rlogin</command>/<command>rsh</command>-like
246client program except it uses an encrypted protocol.</para>
247<indexterm zone="openssh ssh">
248<primary sortas="b-ssh">ssh</primary>
249</indexterm></listitem>
250</varlistentry>
251
252<varlistentry id="sshd">
253<term><command>sshd</command></term>
254<listitem><para>is a daemon that listens for <command>ssh</command> login
255requests.</para>
256<indexterm zone="openssh sshd">
257<primary sortas="b-sshd">sshd</primary>
258</indexterm></listitem>
259</varlistentry>
260
261<varlistentry id="ssh-add">
262<term><command>ssh-add</command></term>
263<listitem><para>is a tool which adds keys to the
264<command>ssh-agent</command>.</para>
265<indexterm zone="openssh ssh-add">
266<primary sortas="b-ssh-add">ssh-add</primary>
267</indexterm></listitem>
268</varlistentry>
269
270<varlistentry id="ssh-agent">
271<term><command>ssh-agent</command></term>
272<listitem><para>is an authentication agent that can store private keys.</para>
273<indexterm zone="openssh ssh-agent">
274<primary sortas="b-ssh-agent">ssh-agent</primary>
275</indexterm></listitem>
276</varlistentry>
277
278<varlistentry id="ssh-keygen">
279<term><command>ssh-keygen</command></term>
280<listitem><para>is a key generation tool.</para>
281<indexterm zone="openssh ssh-keygen">
282<primary sortas="b-ssh-keygen">ssh-keygen</primary>
283</indexterm></listitem>
284</varlistentry>
285
286<varlistentry id="ssh-keyscan">
287<term><command>ssh-keyscan</command></term>
288<listitem><para>is a utility for gathering public host keys from a number of
289hosts.</para>
290<indexterm zone="openssh ssh-keyscan">
291<primary sortas="b-ssh-keyscan">ssh-keyscan</primary>
292</indexterm></listitem>
293</varlistentry>
294
295<varlistentry id="ssh-keysign">
296<term><command>ssh-keysign</command></term>
297<listitem><para>is used by <command>ssh</command> to access the local host
298keys and generate the digital signature required during hostbased
299authentication with <acronym>SSH</acronym> protocol version 2.</para>
300<indexterm zone="openssh ssh-keysign">
301<primary sortas="b-ssh-keysign">ssh-keysign</primary>
302</indexterm></listitem>
303</varlistentry>
304</variablelist>
305
306</sect2>
307
308</sect1>
309
Note: See TracBrowser for help on using the repository browser.