How to use ssh with floppyfw 1.9.x

This brief document will describe one way to use ssh with floppyfw. I assume that you know how to get around using floppyfw, and won't describe, for example, how to mount the disk. If you have questions, please post them to the floppyfw.general newsgroup, located at news.zelow.no.

You can also use this procedure to fit larger packages, which might not fit onto the default floppyfw ramdisk, onto your system.

(Please keep in mind that I haven't tested this extensively yet with 1.9.20. If you find bugs, please let me know.)

    What to do:
  1. Make sure you have all the needed files:
  2. Add the line
    RAMDISK_SIZE=2048
    to your config file. It doesn't have to be 2048, but it does need to be at least 1024 to fit sshd and friends.
  3. Change the SECOND_DEVICE line to your second device, probably /dev/fd1, in the config file.
  4. Make sure your nameservers will be able to reverse-resolve any IPs that will be shelling in. In particular, if you are NATing an unroutable IP range (like 10.*), floppyfw needs to be able to resolve your IPs somehow. Therefore you need to name your local DNS server, or add all of your LAN hosts which might be ssh'ing in to your floppyfw box to your hosts file. (This isn't actually *necessary*, but if you don't do it, ssh will stall while it tries and fails to reverse-resolve your IP.)
  5. Add mke2fs.bz2 and the .ini files to the /packages directory on your first diskette.
  6. Add the other bz2 files to the /packages directory on your second diskette.
  7. Either copy my floppyfw.ini to the /floppyfw directory on your first diskette, or add these lines *after* the licences are copied and *before* the extra packages are loaded:
    if test "$RAMDISK_SIZE" != "n" ; then
      echo "$0: Attempting to make ${RAMDISK_SIZE}k RAM disk on /usr"
      mke2fs -m0 /dev/ram2 $RAMDISK_SIZE
      mount -t ext2 /dev/ram2 /usr
      mkdir /usr/tmp
    fi
    
  8. Update the etc/passwd and etc/shadow files in the login.bz2 package to reflect your desired passwords. There are many ways to do this; here's what I did (with 1.9.9): Brad has a mkpkg utility bundled with sshd1.bz2 that you can use under floppyfw to create the login.bz2 package. I didn't use it because I already had an older package made. There are undoubtedly other ways to accomplish this step, as well--as long as you get *your* root password into login.bz2.
  9. Reboot and test.
  10. Make sure your iptables/ipchains configuration reflects the hosts you want able to ssh in to your floppyfw box. You can change the port sshd listens on by modifying post-sshd.ini to say
    /usr/bin/sshd -p nnn
    where nnn is your desired port number.
  11. Don't blame me if it doesn't work. :)
Good luck!