website annotate en/doc/handbook/secure-server.html @ rev 49

Add Security to Handbook (en)
author Paul Issott <paul@slitaz.org>
date Sun May 18 22:50:22 2008 +0000 (2008-05-18)
parents 65881025ee62
children f0c0c73578c0
rev   line source
paul@42 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
paul@42 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>SliTaz Handbook (en) - Template</title>
paul@42 3
paul@42 4
paul@42 5
paul@42 6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
paul@42 7 <meta name="description" content="slitaz English handbook" />
paul@42 8 <meta name="expires" content="never" />
paul@42 9 <meta name="modified" content="2008-02-26 18:30:00" />
paul@42 10 <meta name="publisher" content="www.slitaz.org" />
paul@42 11 <meta name="author" content="Christophe Lincoln" />
paul@42 12 <link rel="shortcut icon" href="favicon.ico" />
paul@42 13 <link rel="stylesheet" type="text/css" href="book.css" /></head><body bgcolor="#ffffff">
paul@42 14
paul@42 15 <!-- Header and quick navigation -->
paul@42 16 <div id="header">
paul@42 17 <div id="quicknav" align="right">
paul@42 18 <a name="top"></a>
paul@49 19 <a href="security.html">Security</a> |
paul@42 20 <a href="index.html">Table of contents</a>
paul@42 21 </div>
paul@42 22 <h1><font color="#3e1220">SliTaz Handbook (en)</font></h1>
paul@42 23 </div>
paul@42 24
paul@42 25 <!-- Content. -->
paul@42 26 <div id="content">
paul@42 27 <div class="content-right"></div>
paul@42 28
paul@42 29 <h2><font color="#df8f06">Secure SHell (SSH)</font></h2>
paul@42 30
paul@42 31 <ul>
paul@42 32 <li><a href="#about">About Dropbear.</a></li>
paul@42 33 <li><a href="#dbclient">Connecting to a remote host.</a> - (dbclient).</li>
paul@42 34 <li><a href="#scp">Transfer files</a> - (scp).</li>
paul@42 35 <li><a href="#dropbearkey">Generate keys rsa/dss.</a> - (dropbearkey).</li>
paul@42 36 <li><a href="#start-stop-restart">Start, stop, restart SSH server.</a></li>
paul@42 37 </ul>
paul@42 38
paul@42 39 <a name="about"></a>
paul@42 40 <h3>About Dropbear</h3>
paul@42 41 <p>
paul@42 42 Control and administer remotely with the Dropbear SSH secure server. Dropbear is a small SSH client/server
paul@42 43 supporting SSH 2, it's compatible with OpenSSH and uses ~/.ssh/authorized_keys for the management of public keys.
paul@42 44 Dropbear also provides it's own version of <code>scp</code>, allowing you to copy files
paul@46 45 between machines in a secure manner.
paul@42 46 </p>
paul@42 47 <p>
paul@42 48 Project website:
paul@42 49 <a href="http://matt.ucc.asn.au/dropbear/dropbear.html">matt.ucc.asn.au/dropbear/dropbear.html</a>
paul@42 50 </p>
paul@42 51
paul@42 52 <a name="dbclient"></a>
paul@42 53 <h3>Connecting to a remote host with dbclient</h3>
paul@42 54 <p>
paul@42 55 The configuration files for the SSH client are located in the ~/.ssh directory of each user, this contains
paul@42 56 the authorized_keys and known_hosts files. The directory ~/.ssh and known_hosts file are automatically created
paul@46 57 the first time you run the Dropbear client (dbclient).
paul@42 58 </p>
paul@42 59 <p>
paul@46 60 To connect to a remote host employing the user and machine name:
paul@42 61 </p>
paul@42 62 <pre> $ dbclient user@machine.org
paul@42 63 </pre>
paul@42 64 <p>
paul@42 65 You can also connect using the IP address of the machine:
paul@42 66 </p>
paul@42 67 <pre> $ dbclient user@192.168.0.2
paul@42 68 </pre>
paul@42 69
paul@42 70 <a name="scp"></a>
paul@42 71 <h3>Transfer of remote files with scp</h3>
paul@42 72 <p>
paul@46 73 To copy a file from one computer to another, scp can be utilized in the following ways. To copy a file
paul@42 74 named page.html to a remote directory of the user (don't forget the <code>:</code> after the machine name or
paul@42 75 IP address):
paul@42 76 </p>
paul@43 77 <pre> $ scp page.html user@machine.org:path/remote/directory
paul@42 78 </pre>
paul@42 79 <p>
paul@42 80 Copy a file from a remote machine to your local machine:
paul@42 81 </p>
paul@43 82 <pre> $ scp user@machine.org:path/remote/directory/page.html /path/your/directory
paul@42 83 </pre>
paul@42 84
paul@42 85 <a name="dropbearkey"></a>
paul@42 86 <h3>Generate rsa/dss keys with dropbearkey</h3>
paul@42 87 <p>
paul@42 88 Dropbear provides <code>dropbearkey</code> to generate the protected keys rsa
paul@42 89 and dss. Note that when you start the server for the first time, secure keys will be
paul@42 90 automatically generated if they don't already exist. You can use <code>dropbearkey</code> with
paul@42 91 the following argurments:
paul@42 92 </p>
paul@42 93 <pre> # dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
paul@42 94 # dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
paul@42 95 </pre>
paul@42 96
paul@42 97 <a name="start-stop-restart"></a>
paul@42 98 <h3>Start, stop, restart the SSH server</h3>
paul@42 99 <p>
paul@42 100 By default SliTaz will not start the SSH server at boot, to be launched automatically <code>dropbear</code>
paul@42 101 must be added to the variable RUN_DAEMONS in the <code>/etc/rcS.conf</code> file. To start, stop or restart
paul@42 102 the SSH server; use the following commands: <code>/etc/init.d/dropbear [start|stop|restart]</code>.
paul@42 103 Example to start the server:
paul@42 104 </p>
paul@42 105 <pre> # /etc/init.d/dropbear start
paul@42 106 </pre>
paul@42 107 <p>
paul@42 108 Note that the server supports the passing of various options when launched. To change the default values,
paul@42 109 simple modify the daemons configuration file <code>/etc/daemons.conf</code>.
paul@42 110 </p>
paul@42 111
paul@42 112 <!-- End of content -->
paul@42 113 </div>
paul@42 114
paul@42 115 <!-- Footer. -->
paul@42 116 <div id="footer">
paul@42 117 <div class="footer-right"></div>
paul@42 118 <a href="#top">Top of the page</a> |
paul@42 119 <a href="http://www.slitaz.org/en/doc/handbook/index.html">Table of contents</a>
paul@42 120 </div>
paul@42 121
paul@42 122 <div id="copy">
paul@42 123 Copyright © 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
paul@42 124 <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
paul@42 125 Documentation is under
paul@42 126 <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
paul@42 127 and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
paul@42 128 </div>
paul@42 129
paul@42 130 </body></html>
paul@42 131