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