Telnet and Suspend

The telnet IOS exec command enables you to Telnet from one Cisco device to another; in practical use, it is typically to another Cisco device. One of the most important features of the telnet command is the suspend feature. To understand the suspend function, you should to refer to the network diagram in Figure 13-4.

Figure 13-4 Telnet Suspension


In the figure, the router administrator is using Bench to Telnet into the Cincy router. When in Cincy, the user Telnets to Milwaukee. When in Milwaukee, the user suspends the Telnet by pressing Ctrl-Shift-6, followed by pressing the letter x. The user then Telnets to New York and again suspends the connection. The example begins with Bench already logged into Cincy. Example 13-10 shows example output, with annotations to the side.

Example 13-10 Telnet Suspensions

Cincy#telnet milwaukee (User issues command to Telnet to Milwaukee)

Trying Milwaukee ( Open

User Access Verification

Password: (User plugs in password, can type commands at Milwaukee)

Example 13-10 Telnet Suspensions (Continued)

Milwaukee> Milwaukee> Milwaukee>

(Note: User pressed Ctrl-Shift-6 and then x) Cincy#telnet NewYork (User back at Cincy because Telnet was suspended)

(User is getting into New York now, based on telnet NewYork command)

User Access Verification Password:

NewYork> (User can now type commands on New York)




(Note: User pressed Ctrl-Shift-6 and then x)

Cincy#show sessions Conn Host

1 milwaukee * 2 NewYork

(This command lists suspended Telnet sessions) Address Byte Idle Conn Name 0 0 milwaukee 0 0 NewYork

Cincy#where Conn Host

1 milwaukee * 2 NewYork

(where does the same thing) Address Byte Idle Conn Name 0 0 milwaukee 0 0 NewYork

Cincy#resume 1 (Resume connection 1 (see show session) to Milwaukee)

[Resuming connection 1 to milwaukee ... ]

Milwaukee> (User can type commands on Milwaukee)



(Note: User pressed Ctrl-Shift-6 and then x) (User wants to go back to Cincy) Cincy# (WOW! User just pressed Enter and resumes the last Telnet)

[Resuming connection 1 to milwaukee ... ]

Milwaukee> Milwaukee> Milwaukee>

(Note: User pressed Ctrl-Shift-6 and then x) (Tired of Milwaukee again can't imagine why!) Cincy#disconnect 1 (No more need to use Milwaukee Telnet terminated!)

Closing connection to milwaukee [confirm] (User presses Enter to confirm)


[Resuming connection 2 to NewYork ... ]

Example 13-10 Telnet Suspensions (Continued)

(Pressing Enter resumes most recently suspended active Telnet)

NewYork> NewYork> NewYork>

(Note: User pressed Ctrl-Shift-6 and then x) Cincy#disconnect 2 (Done with New York, terminate Telnet)

Closing connection to NewYork [confirm] (Just press Enter to confirm)


The play-by-play notes in the example explain most of the details. Example 13-10 begins with the Cincy command prompt that would be seen in Bench's Telnet window because the user at Bench Telnetted into Cincy first. After Telnetting to Milwaukee, the Telnet connection was suspended. Then, after Telnetting to New York, that connection was suspended. The two connections can be suspended or resumed easily. The resume command can be used to resume either connection; however, the resume command requires a connection ID, which is shown in the show sessions command. (The where command provides the same output.) Also, instead of using the resume command, you can just use the session number as a command. For instance, just typing the command 2 does the same thing as typing the command resume 2.

The interesting and potentially dangerous nuance here is that if a Telnet session is suspended and you simply press Enter, Cisco IOS Software resumes the connection to the most recently suspended Telnet connection. That is fine, until you realize how much you tend to press the Enter key occasionally to clear some of the clutter from the screen. With a suspended Telnet connection, you also just happened to reconnect to another router. This is particularly dangerous when you are changing the configuration or using potentially damaging exec commands—be careful about what router you are actually using when you have suspended Telnet connections.

If you want to know which session has been suspended most recently, look for the session listed in the show session command that has an asterisk to the left of the entry. That session was the most recently suspended session.

Table 13-8 summarizes the commands related to Telnet. Table 13-8 Telnet Command Options


Command Options

Telnet to another device

Use the telnet exec command.

Just type the host name or IP address from exec mode.

Suspend a Telnet session

Press the key sequence Ctrl-Shift-6, then x.

Discover currently suspended Telnet session

Use the where exec command.

Use the show sessions exec command.

Resume a suspended Telnet session

Use the resume command, with no parameter, to reconnect to the most recently suspended Telnet.

Use the resume x command, where x is the number of the suspended Telnet session based on the output of show sessions.

Just press Enter in exec mode to resume to the most recently suspended Telnet session.

Terminate a suspended telnet

Resume connection, and log out using the quit command. Use the disconnect command on the router you Telnnetted from.

Was this article helpful?

0 -1


  • Saimi
    Which command is used to suspend telnet?
    2 years ago
  • medhane
    Why is telnet resume and suspend commands useful?
    1 month ago

Post a comment