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 "7e9880ac20a9b9db0d3fea30a9ff3d46">
|
---|
10 | <!ENTITY openssh-size "920 KB">
|
---|
11 | <!ENTITY openssh-buildsize "15.3 MB">
|
---|
12 | <!ENTITY openssh-time "0.5 SBU (additional 0.7 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="jdk"/>,
|
---|
70 | <xref linkend="net-tools"/>,
|
---|
71 | <xref linkend="sysstat"/>,
|
---|
72 | <ulink url="http://www.opensc-project.org/">OpenSC</ulink>, and
|
---|
73 | <ulink
|
---|
74 | url="http://www.citi.umich.edu/projects/smartcard/sectok.html">libsectok</ulink></para>
|
---|
75 |
|
---|
76 | <para condition="html" role="usernotes">User Notes:
|
---|
77 | <ulink url='&blfs-wiki;/OpenSSH'/></para>
|
---|
78 |
|
---|
79 | </sect2>
|
---|
80 |
|
---|
81 | <sect2 role="installation">
|
---|
82 | <title>Installation of OpenSSH</title>
|
---|
83 |
|
---|
84 | <para><application>OpenSSH</application> runs as two processes when
|
---|
85 | connecting to other computers. The first process is a privileged process
|
---|
86 | and controls the issuance of privileges as necessary. The second process
|
---|
87 | communicates with the network. Additional installation steps are necessary
|
---|
88 | to set up the proper environment, which are performed by the following
|
---|
89 | commands:</para>
|
---|
90 |
|
---|
91 | <screen role="root"><userinput>install -v -m700 -d /var/lib/sshd &&
|
---|
92 | chown -v root:sys /var/lib/sshd &&
|
---|
93 | groupadd -g 50 sshd &&
|
---|
94 | useradd -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:g" configure</userinput></screen>
|
---|
105 |
|
---|
106 | <para>Install <application>OpenSSH</application> by running
|
---|
107 | the following commands:</para>
|
---|
108 |
|
---|
109 | <screen><userinput>sed -i "s/lkrb5 -ldes/lkrb5/" configure &&
|
---|
110 | ./configure --prefix=/usr --sysconfdir=/etc/ssh \
|
---|
111 | --libexecdir=/usr/lib/openssh --with-md5-passwords \
|
---|
112 | --with-privsep-path=/var/lib/sshd &&
|
---|
113 | make</userinput></screen>
|
---|
114 |
|
---|
115 | <!-- Leaving this bunch of stuff for now. The description of all
|
---|
116 | this is now in the Command Explanatations, however.
|
---|
117 | <para>If you use <application>Heimdal</application> as your Kerberos5
|
---|
118 | implementation and you linked the <application>Heimdal</application>
|
---|
119 | libraries into the <application>OpenSSH</application> build using the
|
---|
120 | <option>-with-kerberos5</option> parameter, you'll need to modify the
|
---|
121 | <filename>Makefile</filename> if you previously linked
|
---|
122 | <application>OpenSSL</application> into the
|
---|
123 | <application>Heimdal</application> build or the build will fail. The
|
---|
124 | <application>OpenSSH</application> default expects
|
---|
125 | <application>Heimdal</application> was built using the included
|
---|
126 | <filename class='libraryfile'>libdes</filename> library instead of
|
---|
127 | <application>OpenSSL</application>. Use the following command to modify
|
---|
128 | the <filename>Makefile</filename>:</para>
|
---|
129 | -->
|
---|
130 |
|
---|
131 | <para>If you linked <application>tcp_wrappers</application> into the
|
---|
132 | build using the <option>--with-tcp-wrappers</option> parameter, ensure
|
---|
133 | you add 127.0.0.1 to the sshd line in <filename>/etc/hosts.allow</filename>
|
---|
134 | if you have a restrictive <filename>/etc/hosts.deny</filename> file, or the
|
---|
135 | test suite will fail. To run the test suite, issue: <command>make -k
|
---|
136 | tests</command>. The banner tests are known to fail.</para>
|
---|
137 |
|
---|
138 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
139 |
|
---|
140 | <screen role="root"><userinput>make install &&
|
---|
141 | install -v -m755 -d /usr/share/doc/openssh-&openssh-version; &&
|
---|
142 | install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \
|
---|
143 | /usr/share/doc/openssh-&openssh-version;</userinput></screen>
|
---|
144 |
|
---|
145 | </sect2>
|
---|
146 |
|
---|
147 | <sect2 role="commands">
|
---|
148 | <title>Command Explanations</title>
|
---|
149 |
|
---|
150 | <para><command>sed -i "s/lkrb5 -ldes/lkrb5/" configure</command>:
|
---|
151 | This command fixes a build crash if you used the
|
---|
152 | <option>--with-kerberos5</option> parameter and you built the
|
---|
153 | <application>Heimdal</application> package in accordance with the BLFS
|
---|
154 | instructions. The command is harmless in all other instances.</para>
|
---|
155 |
|
---|
156 | <para><parameter>--sysconfdir=/etc/ssh</parameter>: This prevents
|
---|
157 | the configuration files from being installed in
|
---|
158 | <filename class="directory">/usr/etc</filename>.</para>
|
---|
159 |
|
---|
160 | <para><parameter>--with-md5-passwords</parameter>: This is required
|
---|
161 | if you made the changes recommended by the shadowpasswd_plus
|
---|
162 | LFS hint on your SSH server when you installed the Shadow Password
|
---|
163 | Suite or if you access a SSH server that authenticates by
|
---|
164 | user passwords encrypted with md5.</para>
|
---|
165 |
|
---|
166 | <para><parameter>--libexecdir=/usr/lib/openssh</parameter>: This parameter
|
---|
167 | changes the installation path of some programs to
|
---|
168 | <filename class="directory">/usr/lib/openssh</filename> instead of
|
---|
169 | <filename class="directory">/usr/libexec</filename>.</para>
|
---|
170 |
|
---|
171 | </sect2>
|
---|
172 |
|
---|
173 | <sect2 role="configuration">
|
---|
174 | <title>Configuring OpenSSH</title>
|
---|
175 |
|
---|
176 | <sect3 id="openssh-config">
|
---|
177 | <title>Config Files</title>
|
---|
178 |
|
---|
179 | <para><filename>~/.ssh/*</filename>,
|
---|
180 | <filename>/etc/ssh/ssh_config</filename>, and
|
---|
181 | <filename>/etc/ssh/sshd_config</filename></para>
|
---|
182 |
|
---|
183 | <indexterm zone="openssh openssh-config">
|
---|
184 | <primary sortas="e-AA.ssh">~/.ssh/*</primary>
|
---|
185 | </indexterm>
|
---|
186 |
|
---|
187 | <indexterm zone="openssh openssh-config">
|
---|
188 | <primary sortas="e-etc-ssh-ssh_config">/etc/ssh/ssh_config</primary>
|
---|
189 | </indexterm>
|
---|
190 |
|
---|
191 | <indexterm zone="openssh openssh-config">
|
---|
192 | <primary sortas="e-etc-ssh-sshd_config">/etc/ssh/sshd_config</primary>
|
---|
193 | </indexterm>
|
---|
194 |
|
---|
195 | <para>There are no required changes to any of these files. However,
|
---|
196 | you may wish to view the <filename class='directory'>/etc/ssh/</filename>
|
---|
197 | files and make any changes appropriate for the security of your system.
|
---|
198 | One recommended change is that you disable
|
---|
199 | <systemitem class='username'>root</systemitem> login via
|
---|
200 | <command>ssh</command>. Execute the following command as the
|
---|
201 | <systemitem class='username'>root</systemitem> user to disable
|
---|
202 | <systemitem class='username'>root</systemitem> login via
|
---|
203 | <command>ssh</command>:</para>
|
---|
204 |
|
---|
205 | <screen role="root"><userinput>echo "PermitRootLogin no" >> /etc/ssh/sshd_config</userinput></screen>
|
---|
206 |
|
---|
207 | <para>Additional configuration information can be found in the man
|
---|
208 | pages for <command>sshd</command>, <command>ssh</command> and
|
---|
209 | <command>ssh-agent</command>.</para>
|
---|
210 |
|
---|
211 | </sect3>
|
---|
212 |
|
---|
213 | <sect3 id="openssh-init">
|
---|
214 | <title>Boot Script</title>
|
---|
215 |
|
---|
216 | <para>To start the SSH server at system boot, install the
|
---|
217 | <filename>/etc/rc.d/init.d/sshd</filename> init script included
|
---|
218 | in the <xref linkend="bootscripts"/> package.</para>
|
---|
219 |
|
---|
220 | <indexterm zone="openssh openssh-init">
|
---|
221 | <primary sortas="f-sshd">sshd</primary>
|
---|
222 | </indexterm>
|
---|
223 |
|
---|
224 | <screen role="root"><userinput>make install-sshd</userinput></screen>
|
---|
225 |
|
---|
226 | </sect3>
|
---|
227 |
|
---|
228 | </sect2>
|
---|
229 |
|
---|
230 | <sect2 role="content">
|
---|
231 | <title>Contents</title>
|
---|
232 |
|
---|
233 | <segmentedlist>
|
---|
234 | <segtitle>Installed Programs</segtitle>
|
---|
235 | <segtitle>Installed Libraries</segtitle>
|
---|
236 | <segtitle>Installed Directories</segtitle>
|
---|
237 |
|
---|
238 | <seglistitem>
|
---|
239 | <seg>scp, sftp, sftp-server, slogin, ssh, sshd, ssh-add, ssh-agent,
|
---|
240 | ssh-keygen, ssh-keyscan, and ssh-keysign</seg>
|
---|
241 | <seg>None</seg>
|
---|
242 | <seg>/etc/ssh, /var/lib/sshd and
|
---|
243 | /usr/share/doc/openssh-&openssh-version;</seg>
|
---|
244 | </seglistitem>
|
---|
245 | </segmentedlist>
|
---|
246 |
|
---|
247 | <variablelist>
|
---|
248 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
249 | <?dbfo list-presentation="list"?>
|
---|
250 | <?dbhtml list-presentation="table"?>
|
---|
251 |
|
---|
252 | <varlistentry id="scp">
|
---|
253 | <term><command>scp</command></term>
|
---|
254 | <listitem>
|
---|
255 | <para>is a file copy program that acts like <command>rcp</command>
|
---|
256 | except it uses an encrypted protocol.</para>
|
---|
257 | <indexterm zone="openssh scp">
|
---|
258 | <primary sortas="b-scp">scp</primary>
|
---|
259 | </indexterm>
|
---|
260 | </listitem>
|
---|
261 | </varlistentry>
|
---|
262 |
|
---|
263 | <varlistentry id="sftp">
|
---|
264 | <term><command>sftp</command></term>
|
---|
265 | <listitem>
|
---|
266 | <para>is an FTP-like program that works over
|
---|
267 | SSH1 and SSH2 protocols.</para>
|
---|
268 | <indexterm zone="openssh sftp">
|
---|
269 | <primary sortas="b-sftp">sftp</primary>
|
---|
270 | </indexterm>
|
---|
271 | </listitem>
|
---|
272 | </varlistentry>
|
---|
273 |
|
---|
274 | <varlistentry id="sftp-server">
|
---|
275 | <term><command>sftp-server</command></term>
|
---|
276 | <listitem>
|
---|
277 | <para>is an SFTP server subsystem.</para>
|
---|
278 | <indexterm zone="openssh sftp-server">
|
---|
279 | <primary sortas="b-sftp-server">sftp-server</primary>
|
---|
280 | </indexterm>
|
---|
281 | </listitem>
|
---|
282 | </varlistentry>
|
---|
283 |
|
---|
284 | <varlistentry id="slogin">
|
---|
285 | <term><command>slogin</command></term>
|
---|
286 | <listitem>
|
---|
287 | <para>is a symlink to <command>ssh</command>.</para>
|
---|
288 | <indexterm zone="openssh slogin">
|
---|
289 | <primary sortas="g-slogin">slogin</primary>
|
---|
290 | </indexterm>
|
---|
291 | </listitem>
|
---|
292 | </varlistentry>
|
---|
293 |
|
---|
294 | <varlistentry id="ssh">
|
---|
295 | <term><command>ssh</command></term>
|
---|
296 | <listitem>
|
---|
297 | <para>is an <command>rlogin</command>/<command>rsh</command>-like
|
---|
298 | client program except it uses an encrypted protocol.</para>
|
---|
299 | <indexterm zone="openssh ssh">
|
---|
300 | <primary sortas="b-ssh">ssh</primary>
|
---|
301 | </indexterm>
|
---|
302 | </listitem>
|
---|
303 | </varlistentry>
|
---|
304 |
|
---|
305 | <varlistentry id="sshd">
|
---|
306 | <term><command>sshd</command></term>
|
---|
307 | <listitem>
|
---|
308 | <para>is a daemon that listens for <command>ssh</command> login
|
---|
309 | requests.</para>
|
---|
310 | <indexterm zone="openssh sshd">
|
---|
311 | <primary sortas="b-sshd">sshd</primary>
|
---|
312 | </indexterm>
|
---|
313 | </listitem>
|
---|
314 | </varlistentry>
|
---|
315 |
|
---|
316 | <varlistentry id="ssh-add">
|
---|
317 | <term><command>ssh-add</command></term>
|
---|
318 | <listitem>
|
---|
319 | <para>is a tool which adds keys to the
|
---|
320 | <command>ssh-agent</command>.</para>
|
---|
321 | <indexterm zone="openssh ssh-add">
|
---|
322 | <primary sortas="b-ssh-add">ssh-add</primary>
|
---|
323 | </indexterm>
|
---|
324 | </listitem>
|
---|
325 | </varlistentry>
|
---|
326 |
|
---|
327 | <varlistentry id="ssh-agent">
|
---|
328 | <term><command>ssh-agent</command></term>
|
---|
329 | <listitem>
|
---|
330 | <para>is an authentication agent that can store private keys.</para>
|
---|
331 | <indexterm zone="openssh ssh-agent">
|
---|
332 | <primary sortas="b-ssh-agent">ssh-agent</primary>
|
---|
333 | </indexterm>
|
---|
334 | </listitem>
|
---|
335 | </varlistentry>
|
---|
336 |
|
---|
337 | <varlistentry id="ssh-keygen">
|
---|
338 | <term><command>ssh-keygen</command></term>
|
---|
339 | <listitem>
|
---|
340 | <para>is a key generation tool.</para>
|
---|
341 | <indexterm zone="openssh ssh-keygen">
|
---|
342 | <primary sortas="b-ssh-keygen">ssh-keygen</primary>
|
---|
343 | </indexterm>
|
---|
344 | </listitem>
|
---|
345 | </varlistentry>
|
---|
346 |
|
---|
347 | <varlistentry id="ssh-keyscan">
|
---|
348 | <term><command>ssh-keyscan</command></term>
|
---|
349 | <listitem>
|
---|
350 | <para>is a utility for gathering public host keys from a
|
---|
351 | number of hosts.</para>
|
---|
352 | <indexterm zone="openssh ssh-keyscan">
|
---|
353 | <primary sortas="b-ssh-keyscan">ssh-keyscan</primary>
|
---|
354 | </indexterm>
|
---|
355 | </listitem>
|
---|
356 | </varlistentry>
|
---|
357 |
|
---|
358 | <varlistentry id="ssh-keysign">
|
---|
359 | <term><command>ssh-keysign</command></term>
|
---|
360 | <listitem>
|
---|
361 | <para>is used by <command>ssh</command> to access the local host
|
---|
362 | keys and generate the digital signature required during hostbased
|
---|
363 | authentication with SSH protocol version 2.</para>
|
---|
364 | <indexterm zone="openssh ssh-keysign">
|
---|
365 | <primary sortas="b-ssh-keysign">ssh-keysign</primary>
|
---|
366 | </indexterm>
|
---|
367 | </listitem>
|
---|
368 | </varlistentry>
|
---|
369 |
|
---|
370 | </variablelist>
|
---|
371 |
|
---|
372 | </sect2>
|
---|
373 |
|
---|
374 | </sect1>
|
---|