[0931098] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/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">
|
---|
| 8 | <!ENTITY openssh-download-ftp "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-&openssh-version;.tar.gz">
|
---|
[b21c661] | 9 | <!ENTITY openssh-md5sum "959c663e709c981f07a3315bfd64f3d0">
|
---|
| 10 | <!ENTITY openssh-size "894 KB">
|
---|
| 11 | <!ENTITY openssh-buildsize "15 MB">
|
---|
| 12 | <!ENTITY openssh-time "0.4 SBU">
|
---|
[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>
|
---|
| 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"/>,
|
---|
[b21c661] | 71 | <xref linkend="sysstat"/>,
|
---|
[e4e0d060] | 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 -d -m700 /var/lib/sshd &&
|
---|
[1b83a7c1] | 88 | chown root:sys /var/lib/sshd &&
|
---|
[b21c661] | 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>
|
---|
[0931098] | 92 |
|
---|
[e4e0d060] | 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>
|
---|
[0931098] | 99 |
|
---|
[e4e0d060] | 100 | <screen><userinput>sed -i "s:-lcrypto:/usr/lib/libcrypto.a:g" configure</userinput></screen>
|
---|
[0931098] | 101 |
|
---|
[e4e0d060] | 102 | <para>Install <application>OpenSSH</application> by running
|
---|
| 103 | the following commands:</para>
|
---|
[0931098] | 104 |
|
---|
[e4e0d060] | 105 | <screen><userinput>./configure --prefix=/usr --sysconfdir=/etc/ssh \
|
---|
[1b83a7c1] | 106 | --libexecdir=/usr/sbin --with-md5-passwords \
|
---|
[e4e0d060] | 107 | --with-privsep-path=/var/lib/sshd</userinput></screen>
|
---|
[1b83a7c1] | 108 |
|
---|
[e4e0d060] | 109 | <para>If you use <application>Heimdal</application> as your Kerberos5
|
---|
| 110 | implementation and you linked the <application>Heimdal</application>
|
---|
| 111 | libraries into the build using the <option>--with-kerberos5</option>
|
---|
| 112 | parameter, you'll need to modify the <filename>Makefile</filename> or
|
---|
| 113 | the build will fail. Use the following command:</para>
|
---|
[1b83a7c1] | 114 |
|
---|
[e4e0d060] | 115 | <screen><userinput>sed -i -e "s/lkrb5 -ldes/lkrb5/" Makefile</userinput></screen>
|
---|
[1b83a7c1] | 116 |
|
---|
[e4e0d060] | 117 | <para>Continue the build:</para>
|
---|
[1b83a7c1] | 118 |
|
---|
[e4e0d060] | 119 | <screen><userinput>make</userinput></screen>
|
---|
[1b83a7c1] | 120 |
|
---|
[e4e0d060] | 121 | <para>If you linked <application>tcp_wrappers</application> into the
|
---|
| 122 | build using the <option>--with-tcp-wrappers</option> parameter, ensure
|
---|
| 123 | you add 127.0.0.1 to the sshd line in <filename>/etc/hosts.allow</filename>
|
---|
| 124 | if you have a restrictive <filename>/etc/hosts.deny</filename> file, or the
|
---|
| 125 | testsuite will fail. To run the testsuite, issue: <command>make -k
|
---|
| 126 | tests</command>.</para>
|
---|
[f45b1953] | 127 |
|
---|
[e4e0d060] | 128 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 129 |
|
---|
| 130 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 131 |
|
---|
| 132 | </sect2>
|
---|
| 133 |
|
---|
| 134 | <sect2 role="commands">
|
---|
| 135 | <title>Command Explanations</title>
|
---|
| 136 |
|
---|
| 137 | <para><parameter>--sysconfdir=/etc/ssh</parameter>: This prevents
|
---|
| 138 | the configuration files from being installed in
|
---|
| 139 | <filename class="directory">/usr/etc</filename>.</para>
|
---|
[f45b1953] | 140 |
|
---|
[e4e0d060] | 141 | <para><parameter>--with-md5-passwords</parameter>: This is required
|
---|
| 142 | if you made the changes recommended by the shadowpasswd_plus
|
---|
| 143 | LFS hint on your SSH server when you installed the Shadow Password
|
---|
| 144 | Suite or if you access a SSH server that authenticates by
|
---|
| 145 | user passwords encrypted with md5.</para>
|
---|
| 146 |
|
---|
| 147 | <para><parameter>--libexecdir=/usr/sbin</parameter>: This parameter
|
---|
| 148 | changes the installation path of some programs to
|
---|
| 149 | <filename class="directory">/usr/sbin</filename> instead of
|
---|
| 150 | <filename class="directory">/usr/libexec</filename>.</para>
|
---|
| 151 |
|
---|
| 152 | </sect2>
|
---|
| 153 |
|
---|
| 154 | <sect2 role="configuration">
|
---|
| 155 | <title>Configuring OpenSSH</title>
|
---|
| 156 |
|
---|
| 157 | <sect3 id="openssh-config">
|
---|
| 158 | <title>Config Files</title>
|
---|
| 159 |
|
---|
| 160 | <para><filename>~/.ssh/*</filename>,
|
---|
| 161 | <filename>/etc/ssh/ssh_config</filename>, and
|
---|
| 162 | <filename>/etc/ssh/sshd_config</filename></para>
|
---|
| 163 |
|
---|
| 164 | <indexterm zone="openssh openssh-config">
|
---|
| 165 | <primary sortas="e-AA.ssh">~/.ssh/*</primary>
|
---|
| 166 | </indexterm>
|
---|
| 167 |
|
---|
| 168 | <indexterm zone="openssh openssh-config">
|
---|
| 169 | <primary sortas="e-etc-ssh-ssh_config">/etc/ssh/ssh_config</primary>
|
---|
| 170 | </indexterm>
|
---|
| 171 |
|
---|
| 172 | <indexterm zone="openssh openssh-config">
|
---|
| 173 | <primary sortas="e-etc-ssh-sshd_config">/etc/ssh/sshd_config</primary>
|
---|
| 174 | </indexterm>
|
---|
| 175 |
|
---|
| 176 | <para>There are no required changes to any of these files. However,
|
---|
| 177 | you may wish to view the <filename class='directory'>/etc/ssh/</filename>
|
---|
| 178 | files and make any changes appropriate for the security of your system. One
|
---|
| 179 | recomended change is that you disable root login via <command>ssh</command>.
|
---|
| 180 | Execute the following command to disable root login via
|
---|
| 181 | <command>ssh</command>:</para>
|
---|
| 182 |
|
---|
| 183 | <screen role="root"><userinput>echo "PermitRootLogin no" >> /etc/ssh/sshd_config</userinput></screen>
|
---|
| 184 |
|
---|
| 185 | <para>Additional configuration information can be found in the man
|
---|
| 186 | pages for <command>sshd</command>, <command>ssh</command> and
|
---|
| 187 | <command>ssh-agent</command>.</para>
|
---|
| 188 |
|
---|
| 189 | </sect3>
|
---|
| 190 |
|
---|
| 191 | <sect3 id="openssh-init">
|
---|
| 192 | <title>Boot Script</title>
|
---|
| 193 |
|
---|
| 194 | <para>To start the SSH server at system boot, install the
|
---|
| 195 | <filename>/etc/rc.d/init.d/sshd</filename> init script included
|
---|
| 196 | in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
| 197 |
|
---|
| 198 | <indexterm zone="openssh openssh-init">
|
---|
| 199 | <primary sortas="f-sshd">sshd</primary>
|
---|
| 200 | </indexterm>
|
---|
| 201 |
|
---|
| 202 | <screen role="root"><userinput>make install-sshd</userinput></screen>
|
---|
| 203 |
|
---|
| 204 | </sect3>
|
---|
| 205 |
|
---|
| 206 | </sect2>
|
---|
| 207 |
|
---|
| 208 | <sect2 role="content">
|
---|
| 209 | <title>Contents</title>
|
---|
| 210 |
|
---|
| 211 | <segmentedlist>
|
---|
| 212 | <segtitle>Installed Programs</segtitle>
|
---|
| 213 | <segtitle>Installed Libraries</segtitle>
|
---|
| 214 | <segtitle>Installed Directories</segtitle>
|
---|
| 215 |
|
---|
| 216 | <seglistitem>
|
---|
| 217 | <seg>scp, sftp, sftp-server, slogin, ssh, sshd, ssh-add, ssh-agent,
|
---|
| 218 | ssh-keygen, ssh-keyscan, and ssh-keysign</seg>
|
---|
| 219 | <seg>None</seg>
|
---|
| 220 | <seg>/etc/ssh and /var/lib/sshd</seg>
|
---|
| 221 | </seglistitem>
|
---|
| 222 | </segmentedlist>
|
---|
| 223 |
|
---|
| 224 | <variablelist>
|
---|
| 225 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 226 | <?dbfo list-presentation="list"?>
|
---|
| 227 | <?dbhtml list-presentation="table"?>
|
---|
| 228 |
|
---|
| 229 | <varlistentry id="scp">
|
---|
| 230 | <term><command>scp</command></term>
|
---|
| 231 | <listitem>
|
---|
| 232 | <para>is a file copy program that acts like <command>rcp</command>
|
---|
| 233 | except it uses an encrypted protocol.</para>
|
---|
| 234 | <indexterm zone="openssh scp">
|
---|
| 235 | <primary sortas="b-scp">scp</primary>
|
---|
| 236 | </indexterm>
|
---|
| 237 | </listitem>
|
---|
| 238 | </varlistentry>
|
---|
| 239 |
|
---|
| 240 | <varlistentry id="sftp">
|
---|
| 241 | <term><command>sftp</command></term>
|
---|
| 242 | <listitem>
|
---|
| 243 | <para>is an FTP-like program that works over
|
---|
| 244 | SSH1 and SSH2 protocols.</para>
|
---|
| 245 | <indexterm zone="openssh sftp">
|
---|
| 246 | <primary sortas="b-sftp">sftp</primary>
|
---|
| 247 | </indexterm>
|
---|
| 248 | </listitem>
|
---|
| 249 | </varlistentry>
|
---|
| 250 |
|
---|
| 251 | <varlistentry id="sftp-server">
|
---|
| 252 | <term><command>sftp-server</command></term>
|
---|
| 253 | <listitem>
|
---|
| 254 | <para>is an SFTP server subsystem.</para>
|
---|
| 255 | <indexterm zone="openssh sftp-server">
|
---|
| 256 | <primary sortas="b-sftp-server">sftp-server</primary>
|
---|
| 257 | </indexterm>
|
---|
| 258 | </listitem>
|
---|
| 259 | </varlistentry>
|
---|
| 260 |
|
---|
| 261 | <varlistentry id="slogin">
|
---|
| 262 | <term><command>slogin</command></term>
|
---|
| 263 | <listitem>
|
---|
| 264 | <para>is a symlink to <command>ssh</command>.</para>
|
---|
| 265 | <indexterm zone="openssh slogin">
|
---|
| 266 | <primary sortas="g-slogin">slogin</primary>
|
---|
| 267 | </indexterm>
|
---|
| 268 | </listitem>
|
---|
| 269 | </varlistentry>
|
---|
| 270 |
|
---|
| 271 | <varlistentry id="ssh">
|
---|
| 272 | <term><command>ssh</command></term>
|
---|
| 273 | <listitem>
|
---|
| 274 | <para>is an <command>rlogin</command>/<command>rsh</command>-like
|
---|
| 275 | client program except it uses an encrypted protocol.</para>
|
---|
| 276 | <indexterm zone="openssh ssh">
|
---|
| 277 | <primary sortas="b-ssh">ssh</primary>
|
---|
| 278 | </indexterm>
|
---|
| 279 | </listitem>
|
---|
| 280 | </varlistentry>
|
---|
| 281 |
|
---|
| 282 | <varlistentry id="sshd">
|
---|
| 283 | <term><command>sshd</command></term>
|
---|
| 284 | <listitem>
|
---|
| 285 | <para>is a daemon that listens for <command>ssh</command> login
|
---|
| 286 | requests.</para>
|
---|
| 287 | <indexterm zone="openssh sshd">
|
---|
| 288 | <primary sortas="b-sshd">sshd</primary>
|
---|
| 289 | </indexterm>
|
---|
| 290 | </listitem>
|
---|
| 291 | </varlistentry>
|
---|
| 292 |
|
---|
| 293 | <varlistentry id="ssh-add">
|
---|
| 294 | <term><command>ssh-add</command></term>
|
---|
| 295 | <listitem>
|
---|
| 296 | <para>is a tool which adds keys to the
|
---|
| 297 | <command>ssh-agent</command>.</para>
|
---|
| 298 | <indexterm zone="openssh ssh-add">
|
---|
| 299 | <primary sortas="b-ssh-add">ssh-add</primary>
|
---|
| 300 | </indexterm>
|
---|
| 301 | </listitem>
|
---|
| 302 | </varlistentry>
|
---|
| 303 |
|
---|
| 304 | <varlistentry id="ssh-agent">
|
---|
| 305 | <term><command>ssh-agent</command></term>
|
---|
| 306 | <listitem>
|
---|
| 307 | <para>is an authentication agent that can store private keys.</para>
|
---|
| 308 | <indexterm zone="openssh ssh-agent">
|
---|
| 309 | <primary sortas="b-ssh-agent">ssh-agent</primary>
|
---|
| 310 | </indexterm>
|
---|
| 311 | </listitem>
|
---|
| 312 | </varlistentry>
|
---|
| 313 |
|
---|
| 314 | <varlistentry id="ssh-keygen">
|
---|
| 315 | <term><command>ssh-keygen</command></term>
|
---|
| 316 | <listitem>
|
---|
| 317 | <para>is a key generation tool.</para>
|
---|
| 318 | <indexterm zone="openssh ssh-keygen">
|
---|
| 319 | <primary sortas="b-ssh-keygen">ssh-keygen</primary>
|
---|
| 320 | </indexterm>
|
---|
| 321 | </listitem>
|
---|
| 322 | </varlistentry>
|
---|
| 323 |
|
---|
| 324 | <varlistentry id="ssh-keyscan">
|
---|
| 325 | <term><command>ssh-keyscan</command></term>
|
---|
| 326 | <listitem>
|
---|
| 327 | <para>is a utility for gathering public host keys from a
|
---|
| 328 | number of hosts.</para>
|
---|
| 329 | <indexterm zone="openssh ssh-keyscan">
|
---|
| 330 | <primary sortas="b-ssh-keyscan">ssh-keyscan</primary>
|
---|
| 331 | </indexterm>
|
---|
| 332 | </listitem>
|
---|
| 333 | </varlistentry>
|
---|
| 334 |
|
---|
| 335 | <varlistentry id="ssh-keysign">
|
---|
| 336 | <term><command>ssh-keysign</command></term>
|
---|
| 337 | <listitem>
|
---|
| 338 | <para>is used by <command>ssh</command> to access the local host
|
---|
| 339 | keys and generate the digital signature required during hostbased
|
---|
| 340 | authentication with SSH protocol version 2.</para>
|
---|
| 341 | <indexterm zone="openssh ssh-keysign">
|
---|
| 342 | <primary sortas="b-ssh-keysign">ssh-keysign</primary>
|
---|
| 343 | </indexterm>
|
---|
| 344 | </listitem>
|
---|
| 345 | </varlistentry>
|
---|
| 346 |
|
---|
| 347 | </variablelist>
|
---|
| 348 |
|
---|
| 349 | </sect2>
|
---|
| 350 |
|
---|
| 351 | </sect1>
|
---|