Telnet
- This document covers the compilation, installation and basic configuration of the Netkit Telnet Server (in.telnetd). More advanced configuration is covered in books and online documents. A good place to start is the Linux Documentation Project Website.
- Telnet is regarded as highly insecure due to its use of unencrypted traffic between server and client. This means that a packet sniffer could be used to capture passwords. As such, it is rarely used on public servers any more. An installation guide to the encypted alternative, OpenSSH, can be found on this site. If you are going to use telnet, do so only where you are happy about the security of the network.
- I cannot be held responsible for the security of your telnet server. It is up to you to understand the software you are running. The setup detailed here has no security beyond basic challenge-response password protection. It is possible to secure telnet much more using tcpwrappers or an encypted alternative like SSH. The root user can also be stopped from accessing the system through telnet.
- If you install this software it is highly recommended that you keep up-to-date with security advisories published regarding this telnet server.
- If you spot any major errors on this page, please e-mail me using the link above.
- It is assumed that this installation takes place on a computer on which Core Linux has been successfully installed.
- No software other than the packages bundled with Core Linux have been installed.
- As described in the installation guide, it is assumed that any downloaded application source code is stored in a directory called
/appson the CD-R. - It is assumed that the Core Linux computer is attached to a network on which there is at least one other machine with internet access and a CD burner. It must also be running a telnet client program, such as
telneton *nix or Windows.
Preparation
- Download the telnetd source code from ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/.
- Burn the
.tar.gzfile to a CD. This page assumes that the subdirectory/appsis used for the.tar.gzfile. The CD-ROM can be a multi-session disk.
Booting
- Boot your Core Linux PC.
- Login as
root. You will need to enter the password at the prompt.
Extract the source
- Place the CD-R in the CD-ROM drive. Mount the CD-ROM drive under
/mnt/cdrom. - Change to the
/appsdirectory on the CD-R. - Copy the
netkit-telnet-0.17.tar.gzfile to the directory/usr/src. - Change to the
/usr/srcdirectory and extract the source from the.tar.gzfile.
Configure and compile
- Change to the
/usr/src/netkit-telnet-0.17directory. - Run the
./configurescript. - Change to the
/usr/src/netkit-telnet-0.17/telnetddirectory. - Run the
makeprogram. - Run the
makeprogram with the argumentinstall.
Initial Testing
- If you are certain that the networking elements of your Core Linux PC are set up correctly, and that the telnetd software was correctly compiled and installed then you may want to skip this section.
- Start the telnetd server using
/usr/sbin/in.telnetd -debug. - Using your other computer, try to access the telnet server.
Looping telnetd
- This section details how to have your telnetd server restart automatically when the previous instance finishes. This means that there is always and only one instance of telnetd running. This is much more useful for providing terminal services than having to manually restart the telnetd server after each disconnection, but is less secure. However, with only one instance of telnetd running, only one telnet connection can be made at any one time.
- Create the following shell script at
/usr/sbin/telnetd:#!/bin/sh
x=0
until [ "$x" -ge 1 ]; do
/usr/sbin/in.telnetd -debug
done
- Change the properties of
/usr/sbin/telnetdto make it executable. - Test the new script using the command
/usr/sbin/telnetd. - Using your other computer, see if you can make repeated connections to the telnet server.
Starting and stopping telnetd
- Start the telnetd server using
/usr/sbin/telnetd & - To stop the telnetd server you must use
killto kill the script before killing the single instance ofin.telnetdrunning.
Automating telnetd
- Append the following line to the
/etc/rc.d/rc.muscript:You can also add comments and echoes for your own information./usr/sbin/telnetd & - Reboot the system and check that telnetd is running.

The text of this page is licensed under a Creative Commons License.
