Telnet

Telnet Client and Telnet Server work together to allow users to communicate with a remote computer.

Telnet Client allows users to connect to a remote computer and interact with that computer through a terminal window.

Telnet Server allows users of Telnet Client to log on to the computer running Telnet Server and run character-mode applications on that computer. The Telnet server acts as a gateway through which the Telnet clients communicate with each other. The Telnet server included with XOX supports a maximum of two Telnet clients at a time. If you need additional licenses, please use Telnet Server from the Microsoft Windows Services for UNIX product.

  • For more information about Telnet Client, see Telnet Client.
  • For more information about Telnet Server, see Telnet Server.


Telnet Client

With Telnet Client, Windows users can connect to a remote computer running a Telnet server and run applications on the remote computer or perform administrative tasks on it.

  • For general background information, see Concepts
  • For problem-solving instructions, see Troubleshooting.


Concepts

This section contains information about:

  • Telnet Client overview
  • Using Telnet Client


Telnet Client overview

Telnet uses the Telnet protocol (part of the TCP/IP protocol suite) to connect to a remote computer over a network. Telnet Client software allows a computer to connect to a remote Telnet server and run applications on that server.

Windows Services for UNIX includes an improved, command line-oriented Telnet client. You can use the NTLM authentication process to authenticate clients for Telnet connections between computers running Windows NT, Windows 2000 or XOX.


Using Telnet Client

This section contains information on the following:

  • Authentication
  • Telnet commands
  • Session mode and command mode
  • Managing Telnet from the command line


Authentication

You can use your local Windows user name and password or domain account information to access the Telnet server.

If you do not use the NTLM option for authentication, the user name and password are sent to the Telnet server as plaintext.

If you use NTLM authentication, Telnet Client uses the XOX security context for authentication, and the user is not prompted for a user name and password. The user name and password are encrypted.

Attempts to log on to the Telnet server using NTLM authentication will fail if the password option is set at User Must Change Password at Next Log on. To log on successfully, you must log on to the server directly, change your password, and then log on through Telnet.

If you connect to a Telnet server using NTLM authentication, you will not be able to access additional network resources because of a limitation of the NTLM authentication. In order to access network resources from a Telnet session, you need to access network drives by providing your user name and password again.


Telnet commands

The Telnet Client command prompt accepts the following commands:

Command | Description
open | Use open hostname portnumber to establish a Telnet connection to a host.
close | Use the close command to close an existing Telnet connection.
display Use the display command to view the current settings for the Telnet client.

The display command lists the current operating parameters. If you are in a Telnet session (connected to a Telnet server), to modify the parameters, press CTRL+]. This escapes from the Telnet session. (To return to the Telnet session, press ENTER.) The following operating parameters are available:

  • WILL AUTH (NTLM Authentication)
  • WONT AUTH
  • WILL TERM TYPE
  • WONT TERM TYPE
  • LOCALECHO off
  • LOCALECHO on
quit | Use the quit command to exit from Telnet.
set Use the set command to set the terminal type for the connection, turn on local echo, set authentication to NTLM, set the escape character, and set up logging.

  • SET NTLM turns on NTLM.

    • While you are using NTLM Authentication, you are not prompted for a logon name and password when connecting from a remote computer.

  • SET LOCALECHO turns on local echoing.
  • SET TERM {ANSI|VT100|VT52|VTNT} sets the terminal type to the appropriate terminal type.

    • Use the VT100 terminal type if you are running normal command-line applications. Use the VTNT terminal type if you are running advanced command-line applications, such as edit.

  • ESCAPE Character sets the key sequence to use for switching from session to command mode. For example, to set CTRL+P as your escape character, type set escape, press CTRL+P, and then press ENTER.
  • LOGFILE FileName sets the file to be used for logging Telnet activity. The log file must be on your local computer.

    • Logging begins automatically when you set this option.

  • LOGGING turns on logging.

    • If no log file is set, an error message is displayed.
unset Use unset to turn off local echo or to set authentication to logon/password prompt.

  • UNSET NLM turns off NLM.
  • UNSET LOCALECHO turns off local echoing.
status | Use the status command to determine whether the Telnet client is connected.
CTRL+] | Press CTRL+] to move to the Telnet command prompt from a connected session.
enter | Use the enter command from the command prompt to go to the connected session (if it exists).
?/help | Prints Help information.
For information about Telnet client and server commands see: Telnet


Session mode and command mode

There are two modes of operation in Telnet Client: Telnet command mode and Telnet session mode. Telnet command mode allows the Telnet terminal to open a connection to a remote host, close a connection to a remote host, display operating parameters, set terminal options, print the status, and quit the program.

Once connected to a remote host, the Telnet client is in Telnet session mode. This mode is the most common. After logging on, users are given a command-prompt session. Users are then able to use character-based applications on any remote computer, running Telnet server, as if they were logged on to the system directly.

Once connected to a host, you can return from session mode to command mode to change terminal settings. You can change from a Telnet session mode to a Telnet command mode by pressing CTRL + ]. Press ENTER to return to the Telnet session mode.

For information about Telnet client and server commands see: Telnet


Managing Telnet from the command line

Telnet commands written in the telnet context allow you to communicate with a remote computer that uses the Telnet protocol. Running Telnet without parameters allows you to enter the telnet context. Once you are at the prompt, you can use telnet commands to manage a computer running the Telnet client.

For information about other command-line utilities, see Command-line reference.


Troubleshooting

Which problem are you having?

Telnet client is not restored after Services for UNIX is uninstalled.

Cause: Setup attempted to restore the original Telnet files, but failed.

Solution: Restore the Telnet files from the Windows CD. For example, here are the commands you would use to restore the required files if C:\WINDOWS is the system folder, and D is the source CD:

C:\>copy D:\I386\telnet.exe C:\WINDOWS\SYSTEM32
C:\>expand -r D:\I386\tlntsvr.ex_ C:\WINDOWS\SYSTEM32
C:\>expand -r D:\I386\tlntsvrp.dl_ C:\WINDOWS\SYSTEM32
C:\>expand -r D:\I386\tlntsess.ex_ C:\WINDOWS\SYSTEM32

Characters and lines on the Telnet Client display are misaligned when connecting to Windows Services for UNIX Telnet Server.

Cause: This problem can be caused by a mismatch between the size of the Telnet Client window and the maximum size of the command window that Telnet Server can support.

Solution: Try reducing the size of the Telnet Client window before reconnecting.

If you interrupt and then reconnect a Telnet session that is being conducted from a UNIX computer to a Windows computer, the cursor might lose alignment with the prompt.

Cause: This problem is caused by the interruption in communication.

Solution: Type the Windows command for clear screen: cls.

Related Topics


Telnet Server

Telnet Server for Windows provides ASCII terminal sessions to Telnet clients. Telnet Server supports two types of authentication and supports four types of terminals: ANSI, VT-100, VT-52, and VTNT.

  • For tips about using Telnet Server, see Best practices.
  • For general background information, see Concepts.
  • For problem-solving instructions, see Troubleshooting.


Best practices

  • Provide user-level security
    To control the access that Telnet users have to files on the server, use only NTFS on the system partition. Create a TelnetUsers group, add all Telnet users to that group, and then assign file and directory permissions to control the access that members have to the files and directories.
  • Allow users to disconnect before stopping the service
    Before you stop Telnet Server or uninstall it, send a message to Telnet client sessions that you are about to stop the service. You can then stop the service after the users have had the opportunity to close their sessions.
  • Make sure that the client code page matches the code page of the UNIX terminal
    If users will be connecting to Telnet Server from computers running an internationalized version of UNIX (such as a version capable of supporting European languages), you should ensure that the code page used by the command shell can display extended characters properly. To set the code page for all users when they log on, edit systemroot\system\login.cmd to add the chcp command to set the appropriate code page. For example, to support English and Western European UNIX, add the command chcp 1252.
  • Use a True Type font in the Command Prompt window when using Telnet with any of the four supported Far East languages

    • Telnet supports the following Far East languages: Japanese, Simplified Chinese, Korean, and Traditional Chinese. You must use a True Type font in the Command Prompt window to properly display these Far East language characters. The default font is Raster Fonts.

    If you use Telnet with Far East languages on a regular basis, you can change this property permanently.

    1. To set the Command Prompt window font, right-click the title bar of the Command Prompt window, and then click Properties.
    2. Click a True Type font, and then click OK.
    3. To set the selected True Type font as the default font, in the Apply Properties to Shortcut dialog box, click Modify shortcut that started this window.


Concepts

This section contains information about:

  • Telnet Server overview
  • Telnet Server access
  • Authentication
  • Using login.cmd


Telnet Server overview

Telnet Server is a gateway for Telnet clients. When Microsoft Telnet Server is running on a computer, users can use Telnet clients to connect to it from remote computers. When a Telnet client connects to the Telnet server, the remote user is asked to enter a user name and password. By default, only user name and password combinations that are valid on the local server can be used to log on to that server.

Once logged on, a user is given a command prompt that can be used as if it had been opened in a command prompt window locally. By default, however, the user cannot use applications that interact with the desktop.

Telnet uses the Telnet protocol (part of the TCP/IP protocol suite) to connect to a remote computer over the network.

Telnet licensing

With each installation of Windows 2000 Server, a license provides one installation of Telnet Server.

This table shows the maximum number of simultaneous connections that can be made to Telnet Server:

Telnet Server installed on | Maximum number of connections
Windows 2000 Server | 2
XOX | 2


Telnet server access

By default, only the users who are in the Administrators group have access to your server using Telnet. You can give access to your Telnet server to other users. To specify which users can access your server through Telnet, create a local user group on your server called TelnetClients, and add users to that group. If a group with that name exists on your server, only that group's members can access your server using Telnet.

To grant access to a Telnet server
  1. XOX
  2. In the console tree, expand Local Users and Groups, and click Groups.
  3. Double-click the TelnetClients group.
  4. Click Add.
  5. Follow the instructions in the Select Users box to add users to the TelnetClients group, and then click OK.

Notes

  • XOX
  • The group name TelnetClients must be spelled exactly as shown.
  • If a local group called TelnetClients exists on a computer running Telnet Server, users who are not members of that group cannot access the computer by using Telnet.

Related Topics


Authentication

You can use your local Windows user name and password or domain account information to access Telnet Server. This security scheme, called NTLM authentication, is integrated into Windows security. If you are using NTLM authentication, the client uses the Windows security context for authentication, and the user is not prompted for a user name and password. The user name and password are encrypted. Sessions that do not use encryption use unencrypted text (also known as plaintext) and are visible across the network.

If you do not use NTLM authentication, the user name and password are sent to the Telnet server as plaintext. Anyone capturing the packets of the authentication process can easily read the password and use it to gain unauthorized access to your intranet. The use of plaintext authentication is therefore highly discouraged.

If User Must Change Password at Next Logon is set for a user, an attempt to log on to the Telnet server will fail. The user must log on to the server directly and change the password, and then log on through Telnet.

If you connect to a Telnet server using NTLM authentication, you will not be able to access additional network resources because of a limitation of the NTLM authentication. In order to access network resources from a Telnet session, you need to access network drives by providing your user name and password again.

For information about Telnet client and server commands see: Telnet


Using login.cmd

The program login.cmd is run whenever someone logs on to Telnet Server. You can edit the login.cmd file to change the text that appears when someone logs on, and you can use login.cmd to run other programs.

When Windows Services for UNIX is installed, the program is copied to %SystemRoot%\system32\login.cmd. This is what it looks like:

@echo off
rem
rem  Default global logon script for the Telnet Server
rem
rem  In the default setup, this command script is run
rem  when the initial command shell is invoked. It, in
rem  turn, will try to invoke the individual user's
rem  logon script.
rem
echo
*====================================================
echo
Welcome to Microsoft Telnet Server.
echo
*===============================================
cd /d %HOMEDRIVE%\%HOMEPATH%

In the following example, the file has been edited to display the text "Welcome to my Telnet Server," and run net config to display information about the server configuration:

@echo off
rem
rem  Default global logon script for the Telnet Server
rem
rem  In the default setup, this command script is run
rem  when the initial command shell is invoked. It, in
rem  turn, will try to invoke the individual user's
rem  logon script.
rem
echo
*================================================
echo
Welcome to my Telnet Server
echo
*================================================
cd /d %HOMEDRIVE%\%HOMEPATH% net config server


Troubleshooting

Which problem are you having?

Logon failure: The user has not been granted the requested logon type at this computer.

Cause: The user does not have permission to log on locally to the Telnet Server computer.

Solution: Ensure that the user, or a group the user belongs to (such as the TelnetUsers group), has the right to log on locally. Ensure that the user, or a group that the user belongs to, is not denied the right to log on locally.

Access denied: Specified user is not a member of the TelnetClients group.

Cause: Users must belong to the TelnetClients group in order to connect to Telnet Server.

Solution: Add the user to the TelnetClients group.

Logon failure: The user must change his or her password before logging on the first time.

Cause: The user's password must be changed.

Solution: The user must log on to the computer directly (that is, in person) to change the password.

Logon failure: Telnet Server allows NTLM authentication only.

Cause: Either the client does not support NTLM authentication, or the client supports only NTLM authentication and NTLM authentication is not enabled on Telnet Server.

Solution: If the Telnet client does not support NTLM authentication, use a client that does. If that is not possible, enable plaintext authentication on Telnet Server. For maximum security, use only Telnet clients that support NTLM authentication, and enable NTLM authentication and disable plaintext authentication on Telnet Server.

Error while connecting to localhost: Could not open a connection to host on port 23.

Cause: Telnet Server is not configured to listen on port 23, or Telnet Server is not started.

Solution: Ensure that Telnet Server is started and configured to listen on port 23. If that is not possible, specify the configured port after the host name when connecting.

Cannot connect to network drives.

Cause: NTLM authentication does not allow access to network drives.

Solution: Map the network to a drive letter, for example, by using the net use command.

Related Topics