Compartir a través de


Telnet commands

The telnet commands allow you to communicate with a remote computer that is using the Telnet protocol. You can run telnet without parameters in order to enter the telnet context, indicated by the Telnet prompt (telnet>). From the Telnet prompt, use the following commands to manage a computer running Telnet Client.

The tlntadmn commands allow you to remotely manage a computer running Telnet Server. These commands are run from the command prompt. Used without parameters, tlntadmn displays local server settings.

To use telnet commands at the Telnet prompt

To start Telnet Client and to enter the Telnet prompt

Syntax

telnet [**\\**RemoteServer]

Parameters

\\ RemoteServer   : Specifies the name of the server to which you want to connect.

/? : Displays help at the command prompt.

Remarks

  • Used without parameters, telnet starts Telnet Client.

  • When you are at the Telnet prompt, you must use Telnet commands.

To stop Telnet Client

Syntax

quit

Parameters

none

Remarks

  • You can abbreviate this command to q.

To connect Telnet Client to a remote computer

Syntax

open [**\\**RemoteServer] [Port]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

Port   : Specifies the port that you want to use. If you do not specify a port, the default port is assumed.

Remarks

  • You can abbreviate this command to o.

Examples

To connect to remote server Redmond through port number 44, type:
o redmond 44

To disconnect Telnet Client from a remote computer

Syntax

close [**\\**RemoteServer]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

Remarks

  • You can abbreviate this command to c.

Examples

To disconnect from remote server Redmond, type:
c redmond 44

To set Telnet Client options 

Syntax

set [\\RemoteServer] [ntlm] [localecho] [term {ansi | vt100 | vt52 | vtnt}] [escape Character] [logfile FileName] [logging] [bsasdel] [crlf] [delasbs] [mode {console | stream}] [?

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

ntlm   : Turns on NTLM authentication if it is available on the remote server.

localecho   : Turns on local echo.

term { ansi | vt100 | vt52 | vtnt } : Sets the terminal to the specified type.

escape   Character   : Sets the escape character. The escape character can be a single character, or it can be a combination of the CTRL key plus a character. To set a control-key combination, hold down CTRL while you type the character that you want to assign.

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 appears.

bsasdel   : Sets BACKSPACE to be sent as delete.

crlf   : Sets the new line mode, which causes the ENTER key to send 0x0D, 0x0A.

delasbs   : Sets DELETE to be sent as backspace.

mode { console | stream } : Sets the mode of operation.

?   : Allows you to view the complete syntax for this command.

Remarks

  • To turn off an option that was previously set, at the Telnet prompt, type:

    unset [Option]

  • To set the escape character, type:

    e Character

  • On non-English versions of Telnet, the codeset Option is available. Codeset Option sets the current code set to an option, which can be any one of the following: Shift JIS, Japanese EUC, JIS Kanji, JIS Kanji (78), DEC Kanji, NEC Kanji. You should set the same code set on the remote computer.

To send Telnet Client commands 

Syntax

send [\\RemoteServer] [ao] [ayt] [esc] [ip] [synch] [?]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

ao   : Aborts output command.

ayt   : Sends an "Are you there?" command.

esc   : Sends the current escape character.

ip   : Interrupts the process command.

synch   : Performs the Telnet sync operation.

?   : Allows you to view the complete syntax for this command.

To view the current settings for the Telnet client 

Syntax

display  

Parameters

none

Remarks

  • The display command lists the currently operating parameters for the Telnet client. If you are in a Telnet session (in other words, if you are connected to a Telnet server), you can exit the Telnet session to modify the parameters by pressing CTRL+]. To return to the Telnet session, press ENTER.

To use tlntadmn commands at the command prompt

To administer a computer running Telnet Server

Syntax

tlntadmn [**\\**RemoteServer] [start] [stop] [pause] [continue]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

start   : Starts Telnet Server.

stop   : Stops Telnet Server.

pause   : Interrupts Telnet Server.

continue   : Resumes Telnet Server.

/? : Displays help at the command prompt.

Remarks

  • You can remotely administer a computer running Telnet Server using the tlntadmn commands if both computers are running Windows XP. You can not use the tlntadmn commands to remotely administer a computer running Windows 2000 and Telnet Server from a computer that is running Windows XP.

To administer Telnet sessions

Syntax

tlntadmn [\\RemoteServer] [-s] [-k{SessionID | all}] [-m {SessionID | all} "Message"

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

-s   : Displays active Telnet sessions.

-k { SessionID | all } : Terminates sessions. Type the session ID to terminate a specific session, or type all to terminate all sessions.

-m { SessionID | all } " Message "   : Sends a message to one or more sessions. Type the session ID to send a message to a specific session, or type all to send a message to all sessions. Type the message that you want to send between quotation marks (that is, "Message").

/? : Displays help at the command prompt.

Remarks

  • You can remotely administer a computer running Telnet Server using the tlntadmn commands if both computers are running Windows XP. You can not use the tlntadmn commands to remotely administer a computer running Windows 2000 and Telnet Server from a computer that is running Windows XP.

To set logging options on a computer running Telnet Server

Syntax

tlntadmn [\\RemoteServer] config [auditlocation={eventlog | file | both}] [audit=[{+ | -}admin][{+ | -}user][{+ | -}fail]]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

auditlocation= { eventlog | file | both } : Specifies whether to send event information to Event Viewer, to a file, or to both.

audit= [{ + | - } admin ][{ + | - } user ][{ + | - } fail ] : Specifies which events you want to audit (administrative logon events, user logon events, or failed logon attempts). To audit events of a particular type, type a plus sign (+) before that event type. To stop auditing events of a particular type, type a minus sign (-) before that event type.

/? : Displays help at the command prompt.

Remarks

  • You can remotely administer a computer running Telnet Server using the tlntadmn commands if both computers are running Windows XP. You can not use the tlntadmn commands to remotely administer a computer running Windows 2000 and Telnet Server from a computer that is running Windows XP.

  • If you specify where to send event information without specifying which type or types of information to audit, only information about administrative logon events will be audited and sent to the location that you specified.

Examples

To send event information to Event Viewer, type:

tlntadmn config auditlocation=eventlog

To audit administrative logon events and failed logon attempts, type:

tlntadmn config audit=+admin +fail

To set the default domain on a computer running Telnet Server

Syntax

tlntadmn [**\\**RemoteServer] config [**dom=**DomainName]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

dom= DomainName   : Specifies the domain that you want to make the default domain.

/? : Displays help at the command prompt.

Remarks

  • You can remotely administer a computer running Telnet Server using the tlntadmn commands if both computers are running Windows XP. You can not use the tlntadmn commands to remotely administer a computer running Windows 2000 and Telnet Server from a computer that is running Windows XP.

Examples

To make Redmond the default domain on your local server, type:

tlntadmn config dom=Redmond

To map the Alt key on a computer running Telnet Server

Syntax

tlntadmn [**\\**RemoteServer] config [ctrlakeymap={yes | no}]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

ctrlakeymap= { yes | no } : Specifies whether you want Telnet Server to interpret CTRL+A as ALT. Type yes to map the shortcut key, or type no to prevent mapping.

/? : Displays help at the command prompt.

Remarks

  • You can remotely administer a computer running Telnet Server using the tlntadmn commands if both computers are running Windows XP. You can not use the tlntadmn commands to remotely administer a computer running Windows 2000 and Telnet Server from a computer that is running Windows XP.

  • If you do not map the ALT key, Telnet Server does not send the ALT key to applications that might rely on that key.

To set the maximum number of connections on a computer running Telnet Server

Syntax

tlntadmn [**\\**RemoteServer] config [**maxconn=**PositiveInteger]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

maxconn= PositiveInteger   : Sets the maximum number of connections. You must specify this number with a positive integer that is smaller than 10 million.

/? : Displays help at the command prompt.

Remarks

  • You can remotely administer a computer running Telnet Server using the tlntadmn commands if both computers are running Windows XP. You can not use the tlntadmn commands to remotely administer a computer running Windows 2000 and Telnet Server from a computer that is running Windows XP.

To set the maximum number of failed logon attempts on a computer running Telnet Server

Syntax

tlntadmn [**\\**RemoteServer] config [**maxfail=**PositiveInteger]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

maxfail= PositiveInteger   : Sets the maximum number of failed logon attempts that a user is allowed. You must specify this number with a positive integer that is smaller than 100.

/? : Displays help at the command prompt.

Remarks

  • You can remotely administer a computer running Telnet Server using the tlntadmn commands if both computers are running Windows XP. You can not use the tlntadmn commands to remotely administer a computer running Windows 2000 and Telnet Server from a computer that is running Windows XP.

To set the mode of operation on a computer running Telnet Server

Syntax

tlntadmn [**\\**RemoteServer] config [mode={console | stream}]

Parameters

\\ RemoteServer   : Specifies the name for the server that you want to manage. If you do not specify a server, the local server is assumed.

mode= { console | stream } : Specifies the mode of operation.

/? : Displays help at the command prompt.

Remarks

  • You can remotely administer a computer running Telnet Server using the tlntadmn commands if both computers are running Windows XP. You can not use the tlntadmn commands to remotely administer a computer running Windows 2000 and Telnet Server from a computer that is running Windows XP.

To set the Telnet port on a computer running Telnet Server

Syntax

tlntadmn [**\\**RemoteServer] config [**port=**IntegerValue]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

port= IntegerValue   : Sets the Telnet port. You must specify the port with an integer smaller than 1,024.

/? : Displays help at the command prompt.

Remarks

  • You can remotely administer a computer running Telnet Server using the tlntadmn commands if both computers are running Windows XP. You can not use the tlntadmn commands to remotely administer a computer running Windows 2000 and Telnet Server from a computer that is running Windows XP.

To set the methods of authentication on a computer running Telnet Server

Syntax

tlntadmn [\\RemoteServer] config [sec=[{+ | -}ntlm][{+ | -}passwd]]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

sec= [{ + | - } ntlm ][{ + | - } passwd ] : Specifies whether you want to use NTLM, a password, or both to authenticate logon attempts. To use a particular type of authentication, type a plus sign (+) before that type of authentication. To prevent using a particular type of authentication, type a minus sign (-) before that type of authentication.

/? : Displays help at the command prompt.

Remarks

  • You can remotely administer a computer running Telnet Server using the tlntadmn commands if both computers are running Windows XP. You can not use the tlntadmn commands to remotely administer a computer running Windows 2000 and Telnet Server from a computer that is running Windows XP.

  • NTLM is the authentication protocol for transactions between two computers where one or both computers is running Windows NT 4.0 or an earlier version. In addition, NTLM is the authentication protocol for computers that are not participating in a domain, such as stand-alone servers and workgroups.

To set the time-out for idle sessions on a computer running Telnet Server

Syntax

tlntadmn [**\\**RemoteServer] config [**timeout=hh:mm:**ss]

Parameters

\\ RemoteServer   : Specifies the name of the server that you want to manage. If you do not specify a server, the local server is assumed.

timeout= hh : mm : ss   : Sets the time-out period in hours, minutes, and seconds.

/? : Displays help at the command prompt.

Remarks

  • You can remotely administer a computer running Telnet Server using the tlntadmn commands if both computers are running Windows XP. You can not use the tlntadmn commands to remotely administer a computer running Windows 2000 and Telnet Server from a computer that is running Windows XP.

Remarks

  • To switch from Telnet Client to command mode, at the Telnet prompt, press CTRL+ ]. To switch back to Telnet Client, press ENTER. 

Formatting legend

Format

Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

Command-line reference A-Z

Telnet commands

Session mode and command mode

Authentication

Telnet Client overview