Interix Telnetd

Operating System

Interix Technical Note

Abstract

Interix does not use a Win32®-based telnet server, although the OPENNT 1.1 and 2.0-beta products did. Instead, Interix includes a port of the telnetd program (from the 4.4 BSD-Lite distribution). The telnetd program is a more robust telnet server than the previous Win32 implementation.

This paper discusses setting up, running, and shutting down the new telnet server.

On This Page

Interix Telnetd Interix Telnetd
For More Information For More Information

Interix Telnetd

Note: This paper assumes you have not enabled inetd. If you have enabled inetd, follow the instructions in the paper "Inetd and the Rutils." We recommend the use of inetd instead of installing telnetd as a separate service.

Interix does not use a Win32®-based telnet server, although the OPENNT 1.1 and 2.0-beta products did. Instead, Interix includes a port of the telnetd program (from the 4.4 BSD-Lite distribution). The telnetd program is a more robust telnet server than the previous Win32 implementation.

This paper discusses setting up, running, and shutting down the new telnet server. If you have installed the pre-release package of inetd, see the section below for instructions on integrating telnetd with the inetd package.

The telnetd program can be run from the command line or installed as a service. (As a service, it is started automatically when the system boots.) By default, telnetd runs on port 23, the telnet port. (See the file %SystemRoot%\system32\drivers\etc\SERVICES for a list of the ports recommended in RFC 1060.)

Login shell:

All users login to the Interix shell /bin/ksh.

Security:

Each user runs in the appropriate security context, as if logged in from the main Windows NT®/Windows® 2000 console.

Terminal emulation:

The telnetd has access to the terminfo database. Over a hundred terminals are described and new ones may be added.

Connections:

The number of connections allowed is determined by the software license. The maximum is set by the number of pseudo terminals available on the system (256 pairs in Interix 2.2, 64 in earlier releases); if other applications (such as xterm) are using pseudo terminals, fewer are available for telnetd connections.

Maximum attempts:

The telnetd allows 10 consecutive login attempts. After the fourth failure, it sleeps for 5 seconds before prompting. After the fifth, it sleeps for 10 seconds, then 15, and so on

Installing the New Server

Please follow these steps to install the new telnetd server:

  1. Login to an account with Administrator privileges. This should be the same account used to install Interix.

  2. Uninstall the previous telnet server. They cannot run at the same time, since they will compete for the same port. (Some people have suggested running them simultaneously on different ports, but this has not been tested and is not recommended.)

  3. Run the telnetd command from an Interix shell or install it as a service. Running it from the command line is useful for testing. For example:

$ telnetd &

  1. If you want the telnet server to be started automatically on machine boot, you must install it as a service. See Installing telnetd as a Service below.

If telnetd is started from the command line, it can be stopped with the kill command. If telnetd is installed as a service, it must be stopped by an Administrator using the service command.

If you start telnetd from the command line, do not kill the Interix shell window running the server, even if telnetd is being run in the background.

Installing telnetd as a Service

To install telnetd (or any program) as a service, use the service command.

If you already have a telnet service installed (for example, the telnet service supplied with earlier releases of Interix), you must uninstall it before installing telnetd.

To install the telnet daemon as a service:

  1. Login to an account with Administrator privileges.

  2. From an Interix shell, install the service using the service command:

$ service install //C/Interix/bin/telnetd -s auto

  1. This assumes you've installed Interix in //C/Interix/. Substitute the actual installation directory, if necessary. The -s auto installs telnetd as an automatic service, one which starts automatically on booting the machine.

  2. Once the service is installed, start the telnet service:

$ service start telnetd

By default, installed services start automatically when the system boots. This can be changed when the service is installed; see the service reference page for more information.

Stopping the Telnet Service

To stop the service, login as Administrator and use the command

$ service stop telnetd

A user with an Administrator privileges can also pause and stop the telnetd program using the Services applet of the Windows NT/Windows 2000 Control Panel.

Configuration

The telnetd program does not provide as many configuration options as the earlier telnet server. In particular, you cannot control service access parameters (the "Service" tab of the old server's control panel), you cannot optimize console application performance (the "Console" tab), or specify valid user accounts (the "Users" tab).

The following configuration options are provided on the command line:

  • Debug mode (including setting an alternate port), using the -debug option.

  • Force character/kludge/line-at-a-time mode, using the -k and -l options.

  • The login banner cannot be changed. As of release 2.1, it can be minimized. The domain warning text will be suppressed if telnetd is started with the -q mode. The entire login banner will be suppressed if telnetd is started with the -Q mode.

Specifying valid user accounts is a planned enhancement.

Troubleshooting

Some telnet clients have problems when logging into the Interix server. This has been reported for Solaris telnet clients prior to Solaris 2.5.

It turns out that some telnet clients can only run in character mode or default to character mode. The Interix telnetd checks for this, but not all clients report it. By default, the Interix telnetd sends in line-at-a-time mode, which is more efficient. To force character mode, invoke telnetd with the -k option.

At the client end, there may be options which turn on line-mode.

If the inetd service is already running, there will be conflicts running telnetd as a service. See Telnetd as a Separate Service While Running Inetd below.

Telnetd as a Separate Service While Running Inetd

Microsoft does not recommend running both inetd and telnetd as separate services. It's better to let inetd start telnetd when required.

However, if for some reason you need to have both installed as services, comment out the telnet line in the inetd configuration file, $INTERIX_ROOT/etc/inetd.conf. Use a # character at the beginning of the line;

#telnet   stream  tcp     rest of line...

For More Information

For more information about Interix, see the Interix Web site at: https://www.microsoft.com/windows2000/interix.