Recipe 13.6. Use the Telnet Administrator to Manage a Telnet Server


Problem

You want to manage your Telnet server.

Solution

You administer your Telnet server using the tlntadmn Telnet Administrator command-line tool. You can change Telnet settings with it, find out information about sessions, disconnect a session or sessions, and send a message to a remote user.

To see your basic settings, type tlntadmn at a command prompt. You'll see something like this:

The following are the settings on localhost Alt Key Mapped to 'CTRL+A'  :   YES Idle session timeout        :   1 hours Max connections             :   2 Telnet port                 :   23 Max failed login attempts   :   3 End tasks on disconnect     :   NO Mode of Operation           :   Console Authentication Mechanism    :   NTLM, Password Default Domain              :   PRESTONLAPTOP State                       :   Stopped

To change your settings, use the syntax tlntadmn config followed by the configuration option. For example, to set the maximum number of connections to 8, you would issue this command:

tlntadmn config maxconn = 8

Table 13-2 lists common tlntadmn configuration commands and what they do.

Table 13-2. Common tlntadmn configuration commands

Configuration command

What it does

Tlntadmn config ctrlakeymap = yes

Maps the Alt key to Ctrl-A; the Telnet server will interpret Ctrl-A as pressing the Alt key

Tlntadmn config timeout = hh:mm:ss

Specifies the amount of time that a session is allowed to be idle before it is disconnected, for example, 2:30:30 for two hours, thirty minutes and thirty seconds.

Tlntadmn config timeoutactive = yes or no

Specifies whether idle users should be disconnected when the session timeout is reached.

Tlntadmn config maxfail = n

Specifies the number of login failures before the server disconnects the session with the user. The default is three.

Tlntadmn config maxcon = n

Sets the maximum number of concurrent connections.

Tlntadmn config port = n

Sets the port to be used by Telnet. The default is port 23.


Discussion

You can also use tlntadmn to disconnect a session, or to send a user a message. To do that, you first need to know what sessions are active, and you need to find the session ID for each session. Issue the command tlntadmn -s all and you'll be shown each session. The session ID is the number in the first column, for example, 366 or 924. To kill a session, issue the command tlntadmn -k ID, for example, tlntadmn -k 366. To send a message to a user, use the command:

Tlntadmn -m ID Your message

For example:

Tlntadmn -m 366 I'm about to bring the system down.

See Also

Recipe 13.5 for setting up and configuring a Telnet server



Windows XP Cookbook
Windows XP Cookbook (Cookbooks)
ISBN: 0596007256
EAN: 2147483647
Year: 2006
Pages: 408

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net