📄 user_guide.html
字号:
To convert an OpenSSH key stored in <tt> /.ssh/id_rsa</tt>, do:<p><pre> dropbearconvert openssh dropbear ~/.ssh/id\_rsa ~/.ssh/id\_rsa.db</pre><p>The new key will be stored in <tt> /.ssh/id_rsa.db</tt>. You canuse the <tt>-i</tt> switch to <tt>dbclient</tt> to make it use yournew key for authentication. The public key part of the old OpenSSHkey can be used as-is for pasting into your <tt> /.ssh/authorized_keys</tt>file. Conversion is only needed for the private key.<p>To create a new RSA key to store in <tt> /.ssh/id_rsa.db</tt>, youcan use the following command:<p><pre> dropbearkey -t rsa -f ~/.ssh/id\_rsa.db</pre><p>The public key part of the new key will be printed to the screen.You can put it into the <tt> /.ssh/authorized_keys</tt> file on allmachines where you want to be able to login using your new privatekey stored in <tt> /.ssh/id_rsa.db</tt>. You can create a DSS keyinstead of an RSA key by using <tt>-t</tt> <tt>dss</tt> instead of<tt>-t</tt> <tt>rsa</tt>. Should you lose the public key, you can alwaysget it back by using the private key and the <tt>-y</tt> switchto <tt>dropbearkey</tt>:<p><pre> dropbearkey -y -f ~/.ssh/id\_rsa.db</pre><p>If you want to use <tt>scp</tt> to copy files from another machine,the standard <tt>scp</tt> program from OpenSSH is included with<tt>dropbear</tt> and ttylinux.<p><h2><a name="SECTION00045000000000000000"><span class="arabic">3</span>.<span class="arabic">5</span> Setting up network devices</a></h2><p>Basic network setting are located in the <tt>/etc/network.conf</tt> file. Inthat file, you can globally disable or enable networking. Also, it ispossible to specify a gateway address. If configured, ttylinux willsetup a default route to the gateway on bootup. This is mainly usefulif you don't use modem or ISDN dialup. If you do use dialup, thedefault route will be overwritten once you start a dialup connection.<p>Note that loopback networking via the <tt>lo</tt> device is always enabled.The setting in <tt>/etc/network.conf</tt> only covers devices that can contactthe outside world.<p>To set up a network device, go to the directory <tt>/etc/network.d</tt> andcopy the file <tt>sample</tt> found there to a file named <tt>interface.dev</tt>.For example, if you want to setup the device <tt>eth0</tt>, name the file<tt>interface.eth0</tt>:<p><pre> cp sample interface.eth0</pre><p>Now edit the new file to adjust the settings for the device. You caneither let the system use the DHCP protocol to obtain the settingsfrom a DHCP server or you can set the IP address and other parametersmanually within the file.<p><h2><a name="SECTION00046000000000000000"><span class="arabic">3</span>.<span class="arabic">6</span> Using the firewall</a></h2><p>The default settings of the ttylinux firewall script assume that thenetwork interface to the rest of the world is called <tt>ippp0</tt> or<tt>ppp0</tt>, depending on whether you use ISDN or modem dialup. By default,the firewall will allow the world to access the SSH server, but willdeny access to the telnet server. Other incoming connection attemptswill also be denied and logged (rate limited to an average of 3 messagesper hour), except for connections to the <tt>ftp-data</tt> port, which isused for active FTP sessions and allowed in. This applies to TCPconnections. For the UDP protocol, incoming packets to ports above 1024are allowed. Also, the outside world is not allowed to ping the ttylinuxmachine.<p>Outgoing traffic is not firewalled at all.<p>You can change the settings of the firewall in <tt>/etc/firewall.conf</tt>.The only configuration options are whether to allow or deny access tothe SSH and telnet servers.<p>Note that this firewall script is very simple and assumes that localusers are always trusted. There is no protection against usersrunning server daemons on UDP ports above 1024. If you don't trustyour users, this firewall script is not enough for you! Also notethat only the <tt>ppp0</tt> or <tt>ippp0</tt> device is protected, all otherinterfaces are not firewalled at all.<p><h2><a name="SECTION00047000000000000000"><span class="arabic">3</span>.<span class="arabic">7</span> Shell environment</a></h2><p>The default shell used by ttylinux is GNU bash. You can change thestartup environment (variables, aliases, etc) in <tt>/etc/profile</tt>.You can also put files into the directory <tt>/etc/profile.d</tt> - allreadable files in that directory will be sourced by <tt>bash</tt> when youlogin on the ttylinux machine.<p>Using <tt>/etc/profile.d</tt> is a good choice for your own personal changes.You may want to update to a new version of ttylinux sometime later,and you could end up loosing all your changes to <tt>/etc/profile</tt>if you forget to make a backup. In <tt>/etc/profile.d</tt>, your changes aresafe.<p><h2><a name="SECTION00048000000000000000"><span class="arabic">3</span>.<span class="arabic">8</span> Package Management</a></h2><p>Package management is handled by a shell script called <tt>pacman</tt>(a pun on Package Manager). Its options are somewhat similar to RedHat's package manager RPM. It is possible to install and removepackages and to query the database of installed packages and files.<p>The binary packages used by ttylinux are basically <tt>tar</tt>archives compressed with the <tt>bzip2</tt> algorithm. You can downloadall the packages that normally come with the distribution fromthe downloads page on the ttylinux homepage. You may need todo that if you remove a package on a running ttylinux systemand later want to reinstall it.<p>To install the package <tt>bash-3.0-2.bin.tbz</tt>, you woulduse the following command:<p><pre> pacman -i bash-3.0-2.bin.tbz</pre><p>You can also install a package from standard input, which canbe useful for forming a pipe with the <tt>wget</tt> program. This allowsyou to install a package from the network without having tostore it on the ttylinux system. For example, to downloadthe <tt>bash</tt> package from the hypothetical <tt>foo.org</tt>web server, you would use:<p><pre> wget http:/foo.org/bash-3.0-2.bin.tbz -O - | pacman -i -</pre><p>Three different options are available for querying the databaseof installed packages and files. To get a list of all installedpackages, run<p><pre> pacman -qa</pre><p>To find out which package the file <tt>/bin/login</tt> belongs to, use<p><pre> pacman -qf /bin/login</pre><p>To list all files from the <tt>e2fsprogs</tt> package, run<p><pre> pacman -ql e2fsprogs</pre><p>If you want to remove a package, you can do so by use of the <tt>-e</tt>option. To remove the <tt>isdn4k-utils</tt> package, you woulduse the following command:<p><pre> pacman -e isdn4k-utils</pre><p>You can also use the <tt>-v</tt> option to get verbose output duringinstallation and removal of packages. <tt>pacman</tt> will then listall the files it has installed or removed.<p>The <tt>pacman</tt> script get its knowledge about installed packagesand files from the directory <tt>/var/log/packages</tt>, where youcan find one file per installed package. The file contains alisting of all files that belong to that particular package.<tt>pacman</tt> will not notice when you delete files by hand, itexclusively uses information found in <tt>/var/log/packages</tt>.<p><h2><a name="SECTION00049000000000000000"><span class="arabic">3</span>.<span class="arabic">9</span> Using <tt>devfs</tt> (no longer supported)</a></h2><p>Previous versions of ttylinux had support for running Linux kernelswith the <tt>devfs</tt> device filesystem enabled. However, starting from the 2.6 kernel, <tt>devfs</tt> is considered obsolete by the main kerneldevelopers. A replacement solution is called <tt>udev</tt> and runscompletely in user space. As a consequence, I have dropped the minimal<tt>devfs</tt> support that was present in ttylinux. As of now, <tt>udev</tt>integration is not planned because I still want to support pre-2.6kernels, but that may change in the future.<p><h1><a name="SECTION00050000000000000000"><span class="arabic">4</span> Contact</a></h1><p>If you have bug reports, suggestions, or anything else about ttylinuxthat you think is important, feel free to contact me. You can reachme by email at:<p><pre> Pascal Schmidt <ttylinux@ewetel.net></pre><p>See the file <tt>AUTHORS</tt> in the ttylinux distribution for a list ofpeople who contributed ideas, bug reports, or code so far.<p><p><h1><a name="SECTION00060000000000000000"></a><a name="makecdrom"></a><br>A. How to create a bootable ttylinux CD</h1><p>Please note: the following instructions are for putting togethera 2.88 MB floppy image that can be put onto a bootable CD-ROM.This is a different approach to that used by the officialttylinux CD-ROM version. The recipe below produces a smallerimage than the official one, but the distribution installerwill <b>not</b> work with the smaller images. There is a scriptcalled <tt>mkttyiso</tt> that is provided with the binary and sourcetarball versions of the distribution that can be used to puttogether the larger, installer-compatible CD-ROM images.<p>To follow the instructions, you need the following programs on yourworking system: <tt>mkisofs</tt>, <tt>mkdosfs</tt>, and <tt>syslinux</tt>.<tt>mkdosfs</tt> is usually found inside a package called <tt>dosfstools</tt>.<p>You will need the ttylinux filesystem image <tt>rootfs.gz</tt> and a Linuxkernel image (the result of a <tt>make</tt> <tt>zImage</tt> or <tt>make</tt><tt>bzImage</tt>). I assume you have these files in your current workingdirectory and the kernel image file is called <tt>vmlinuz</tt>. Thefollowing instructions will only work for <tt>root</tt>, not normal users.<p>First, go through the rest of this user guide and do all thecustomization you want to do. Once ttylinux is burned onto the CD,you don't get any further chances to change anything.<p>Now we start preparing the CD image.<p><pre> mkdir mnt mkdir -p iso/boot dd if=/dev/zero of=image bs=10k count=288 mkdosfs image syslinux image mount -o loop image mnt cp vmlinuz mnt/linux rdev mnt/linux /dev/ram0 cp rootfs.gz mnt</pre><p>At this point, we have created an image file resembling a 2.88 megabytefloppy disk, <tt>syslinux</tt> has put a bootloader onto this image, wehave mounted the image on the <tt>mnt</tt> directory and copied our kernelimage and filesystem image files onto the disk image. We also toldthe kernel to expect the root filesystem on <tt>/dev/ram0</tt> when booting.<p>Now we need to create a <tt>syslinux.cfg</tt> configuration file on the diskimage.<p><pre> vi mnt/syslinux.cfg</pre><p>In this file, place the line<p><pre> append initrd=rootfs.gz</pre><p>If you need to pass kernel parameters to your kernel, do this on thesame append line. For example, if you need to pass <tt>idebus=33</tt>,your line should be<p><pre> append initrd=rootfs.gz idebus=33</pre><p>Now we are finished creating the disk image we need for making abootable CD. Let's start putting together the ISO image.<p><pre> umount mnt cp image iso/boot/boot.img</pre><p>The boot image itself is only 2.88 megabytes, so you will have extraspace available. You can mount the CD after booting to get access toall the files you put on the ISO image in addition to the <tt>boot.img</tt>file. Simply put anything you want into the <tt>iso</tt> directory now. Onceyou are done with that, do:<p><pre> cd iso mkisofs -r -b boot/boot.img -c boot/boot.cat -o ../bootcd.iso . cd ..</pre><p>Congratulations, you finished the job of creating a bootable ISOimage with ttylinux on it. All you need to do now is use some CDburning program to put the <tt>bootcd.iso</tt> image on a real CD.You could also save the <tt>iso/boot/boot.img</tt> file and useit to make bootable discs out of all the ISO images you create -all that is needed is about 3 megabytes of free space on theCD.<p><br><hr></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -