[BusyBox] How I got telnetd to run

lbrigman at fcpa.fujitsu.com lbrigman at fcpa.fujitsu.com
Tue May 20 18:11:15 UTC 2003


There has been several people asking about this but I have not seen any
solid answers.

Here is what I did to get my diskless nodes to run telnetd.  Part of the
problem with this
is that telnetd is considered a security risk and has been removed from
most default
distribution installations and replaced with ssh along with all the
supporting documentation.
Also I was not ever successful using the predeclared devices or using
inetd.  This is probably
my own fault because of a lack of understanding.


1. Compile busybox with telnetd on and set "use devpts" in "General
Configuration" to on.  You
    don't need to compile     or turn on inetd, as this add to the number
of files that are needed.

2. Build a kernel with filesystems ->/dev/pts = Y.  Character Devices
Unix98 PTY = Y.
    Chose a number of PTY to support.  Configure your networking as
required for your setup.

3. In your root file system make a directory /dev/pts and mknod /dev/ptmx c
5 2

4. If you are using shared libraries make sure you have
      llibnsl.so.1 libnss_files.so.2 libnss_compat.so.2
    with the appropriate symbolic links.  You will have to have others for
busybox to even run.
    (My problem with some of the networking code is that mklibs.sh misses
these libraries)

5.  Have an entry in the /etc/fstab file like
      none  /dev/pts          devpts      defaults          0     0
    You will have to mount it either manually (mount -t devpts /dev/pts) or
when your startup
    scripts run "mount -a".

6. You can start telnetd from the inittab but if you run it with respawn it
will consume all you memory
    as busybox (at least as late as 20030413 unstable development) has
problems with daemons.
    So a working inittab line "::once:/usr/sbin/telnetd"

    For testing you can start it from the command line with no options.

After about two months of part-time debugging I have telnetd accepting
connections , giving
me a prompt and responding to commands.  I'm still having a small problem
with it after all this; it returns
two prompts after any command except more.  This I can live with for a
while as I have bigger task/problems
to work on.

----
Larry Brigman
Fujitsu Computer Products of America
503.693.2051 lbrigman at fcpa.fujitsu.com
Coins 87-7935-2051




More information about the busybox mailing list