telnet

To log on to a host that supports Telnet, use the telnet EXEC command.

telnet host [port] [keyword]
Syntax Description
host A host name or an IP address.
port (Optional) A decimal TCP port number; the default is the Telnet router port (decimal 23) on the host.
keyword (Optional) One of the options listed in Table 72.

Telnet Connection Options
Option Description
/debug Enables Telnet debugging mode.
/encrypt kerberos Enables an encrypted Telnet session. This keyword is available only if you have the Kerberized Telnet subsystem.
If you authenticate using Kerberos Credentials, the use of this keyword initiates an encryption negotiation with the remote server. If the encryption negotiation fails, the Telnet connection will be reset. If the encryption negotiation is successful, the Telnet connection will be established, and the Telnet session will continue in encrypted mode (all Telnet traffic for the session will be encrypted).
/line Enables Telnet line mode. In this mode, the Cisco IOS software sends no data to the host until you press Return. You can edit the line using the standard Cisco IOS software command-editing characters. The /line keyword is a local switch; the remote router is not notified of the mode change.
/noecho Disables local echo.
/route path Specifies loose source routing. The path argument is a list of host names or IP addresses that specify network nodes and ends with the final destination.
/source-interface Specifies the source interface.
/stream Turns on stream processing, which enables a raw TCP stream with no Telnet control sequences. A stream connection does not process Telnet options and can be appropriate for connections to ports running UUCP and other non-Telnet protocols.
port-number Port number.
bgp Border Gateway Protocol.
chargen Character generator.
cmd rcmd Remote commands.
daytime Daytime.
discard Discard.
domain Domain Name Service.
echo Echo.
exec EXEC.
finger Finger
ftp File Transfer Protocol.
ftp-data FTP data connections (used infrequently).
gopher Gopher.
hostname NIC hostname server.
ident Ident Protocol.
irc Internet Relay Chat
klogin Kerberos login.
kshell Kerberos shell.
login Login (rlogin).
lpd Printer service.
nntp Network News Transport Protocol.
node Connect to a specific LAT node
pop2 Post Office Protocol v2.
pop3 Post Office Protocol v3.
port Destination LAT port name.
smtp Simple Mail Transport Protocol.
sunrpc Sun Remote Procedure Call.
syslog Syslog.
tacacs Specify TACACS security.
talk Talk.
telnet Telnet.
time Time.
uucp Unix-to-Unix Copy Program.
whois Nickname.
www World Wide Web (HTTP).
Command Mode

EXEC

Usage Guidelines

This command first appeared in a release prior to Cisco IOS Release 10.0.

With the Cisco IOS implementation of TCP/IP, you are not required to enter the connect or telnet commands to establish a Telnet connection. You can just enter the learned host name--as long as the following conditions are met:

To display a list of the available hosts, use the show hosts command. To display the status of all TCP connections, use the show tcp command.

The Cisco IOS software assigns a logical name to each connection, and several commands use these names to identify connections. The logical name is the same as the host name, unless that name is already in use, or you change the connection name with the name-connection EXEC command. If the name is already in use, the Cisco IOS software assigns a null name to the connection.

The Telnet software supports special Telnet commands in the form of Telnet sequences that map generic terminal control functions to operating system-specific functions. To issue a special Telnet command, enter the escape sequence and then a command character. The default escape sequence is Ctrl-^ (press and hold the Control and Shift keys and the 6 key). You can enter the command character as you hold down Ctrl or with Ctrl released; you can use either uppercase or lowercase letters. The following table lists the special Telnet escape sequences.

Task Escape Sequence*
Break Ctrl-^ b
Interrupt Process (IP) Ctrl-^ c
Erase Character (EC) Ctrl-^ h
Abort Output (AO) Ctrl-^ o
Are You There? (AYT) Ctrl-^ t
Erase Line (EL) Ctrl-^ u

* The caret (^) symbol refers to Shift-6 on your keyboard.

At any time during an active Telnet session, you can list the Telnet commands by pressing the escape sequence keys followed by a question mark at the system prompt:

Ctrl-^ ?

A sample of this list follows. In this sample output, the first caret (^) symbol represents the Control key, while the second caret represents Shift-6 on your keyboard:

router> ^^?
[Special telnet escape help]
^^B  sends telnet BREAK
^^C  sends telnet IP
^^H  sends telnet EC
^^O  sends telnet AO
^^T  sends telnet AYT
^^U  sends telnet EL 
  

You can have several concurrent Telnet sessions open and switch back and forth between them. To open a subsequent session, first suspend the current connection by pressing the escape sequence (Ctrl-Shift-6 then x [Ctrl^x] by default) to return to the system command prompt. Then open a new connection with the telnet command.

To terminate an active Telnet session, issue any of the following commands at the prompt of the device to which you are connecting:

close
disconnect
exit
logout
quit

Examples

The following example establishes an encrypted Telnet session from a router to a remote host named host1:

router> telnet host1 /encrypt kerberos
  

The following example routes packets from the source system host1 to kl.sri.com, then to 10.1.0.11, and finally back to host1:

router> telnet host1 /route:kl.sri.com 10.1.0.11 host1
  

The following example connects to a host with logical name host1:

router> host1