Telnet archives - Network technologies and trends

Network technologies and trends:

Telnet

Nov 21 2009   11:36AM GMT

How to configure the System prompt in a Cisco Router or a Cisco Switch?



Posted by: Yasir Irfan
Cisco Router, Cisco Router tips, Cisco Switches, Cisco Tips, How to configure the System prompt in a Cisco Router or a Cisco Switch, System prompt, no prompt, TTY, VTY, config t, hostname, Cisco Hostname, %h:%n%p, active telnet sessions, Telnet, Cisco Device, Network Tips, Network Technologies and Trends

 

There is a cool handy way to know TTY sessions established in any Cisco Router or a Cisco Switch. By using this feature you can know the number of active telnet sessions from the prompt itself.

Normally whenever you log to any Cisco Router or Switch you will find this menu

ITKE-AS01#

 

By using the “prompt” command you can see the difference

 

You might be wondering how come this is possible, ok now let me show you how to enable this feature in a Cisco Router or a Cisco Switch,

Log in to your Cisco Device and use the following command “prompt %h:%n%p”

 

ITKE-AS01#config t

ITKE-AS01 (config)# prompt %h:%n%p
ITKE-AS01 (config)# exit

 

In the example I have used three escape sequences to set the prompt name to the hostname (%h), followed by the command number (%n) and then followed by the appropriate prompt character for the current command mode (%p).

You can see the difference in the hostname after applying the “prompt %h:%n%p” command.

ITKE-AS01:1#sho users

    Line       User       Host(s)              Idle       Location

*  1 vty 0     yasir      idle                 00:00:00 10.0.0.5

 

  Interface      User        Mode                     Idle     Peer Address

ITKE-AS01:1#

 

As the number of TTY session increases you can see the incremental change in the hostname with the sequence number as displayed below.

Example with two TTY sessions

ITKE-AS01:2#sho users

    Line       User       Host(s)              Idle       Location

   1 vty 0     yasir      idle                 00:00:23 10.0.0.5

*  2 vty 1     itkeuser      idle                 00:00:00 10.0.0.5

 

  Interface      User        Mode                     Idle     Peer Address

 

ITKE-AS01:2#

 

Example with three TTY sessions

ITKE-AS01:3#sho users

    Line       User       Host(s)              Idle       Location

   1 vty 0     yasir      idle                 00:01:14 10.0.0.5

   2 vty 1     itkeuser      idle           00:00:50 10.0.0.6

*  3 vty 2     itkeadmin   idle         00:00:00 10.0.0.7

 

  Interface      User        Mode                     Idle     Peer Address

 

ITKE-AS01:3#

 

Example with four TTY sessions

ITKE-AS01:4#sho users

    Line       User       Host(s)              Idle       Location

   1 vty 0     yasir      idle                 00:01:43 10.0.0.5

   2 vty 1     itkeuser      idle            00:01:20 10.0.0.6

   3 vty 2     itkeadmin   idle            00:00:29 10.0.0.7

*  4 vty 3     yasir      idle                 00:00:00 10.0.0.5

 

  Interface      User        Mode                     Idle     Peer Address

 

ITKE-AS01:4#

 

I you want to disable the TTY display enter the “no prompt” command as shown below.
ITKE-AS01:4#config t
ITKE-AS01:4 (config)# no prompt

 

Following are the prompt Variables available for the “prompt” command.

Sep 12 2009   7:34AM GMT

How to capture a text using PuTTY client?



Posted by: Yasir Irfan
PuTTY, Telnet, SSH, Telnet Client, Backup, running config, Startup config, Cisco Router, Cisco Switch, Cisco Tips, Cisco backup

 

PuTTY doesn’t need any introduction as its one of the widely used for remote console utility. PuTTY is an SSH and telnet client.

In day to day operational activities we do telnet or SSH to our Cisco routers or Switches, at times we need to backup a running or startup config or   a Cisco router or a switch or even some times we need to capture the terminal session logs for technical information etc.  This is can be easily done by using the PuTTY client.

I will show you how to capture a text using PuTTY client.

Once you have established a remote session with a Cisco router or a Switch, follow the following steps

 

Step 1: Right Click on the menu bar and select “Change Settings”

 

Step 2: Click logging under the icon Session.

 

Step 3: Then select “All Session Output”.

 

Step 4: Select the location using the browse button and enter the desired file name and click apply.

 

These steps will create the log file in the specified location and it will log everything you did in that particular telnet or SSH session.


Sep 8 2009   9:45AM GMT

Remote Telnet useful tips!



Posted by: Yasir Irfan
Switches, Cisco, Cisco Tips, Cisco 3560, Cisco Learning, Network Troubleshooting, IOS commands, Cisco Routers, reload, Cisco Switch, Cisco Troubleshooting, Router Troubleshooting, Telnet, SSH

 

We all work remotely with Cisco routers and Switches, we often do login to do some configuration changes in the Cisco routers and Switches. What if we configured wrongly in the live Cisco routers and Switches which are located in the remote sites, we don’t enjoy the liberty of resetting the devices unless we have control over the power distribution.

 

In this scenario the “reload” command proves to be very handy and useful. Just before making any changes to the configuration we can use the “reload” command as demonstrated below

 

ITKE-Cisco#reload in ?

Delay before reload (mmm or hhh:mm)

 

ITKE-Cisco#reload in 10

 

System configuration has been modified. Save? [yes/no]: no

Building configuration…

[OK]

Reload scheduled in 10 minutes by yasir on vty0 (10.0.0.5)

Proceed with reload? [confirm]

ITKE-Cisco#

ITKE-Cisco#

 

 

***

*** — SHUTDOWN in 0:05:00 —

***

 

The above demonstrated command will reload the device in 10 minutes. After applying the “reload” command we can proceed with the configuration changes. If things go wrong and we lost connectivity

to the device, then try back after 10 minutes as the device will get reloaded with the original startup-configuration which can helps us to restore the connectivity to the device.

 

Once we are sure about the new configuration and its working properly without any hassles there is always a way  “reload cancel” command is there to cancel the reload.

 

ITKE-Cisco#reload cancel

 

I find this command to be very handy and useful especially when we have to telnet or SSH to remote Cisco router or a Switch.


Sep 6 2008   10:40AM GMT

The best way to record the serial number for Cisco Devices for Remote support.



Posted by: Yasir Irfan
Switches, Cisco, Telnet, Cisco 2950, Cisco 6500, Cisco Tips, Cisco 3745, IOS commands

Imagine if you are accesing the remote router and need to figure out the serial number for a router or the Circuit IDs of the serial interface, then you may start looking your docmented data or call the remote technician to help you out in figuring these details. The best and easy way to get these details in matter of seconds is to put the serial number of each device in the Banner MOTD, and the circuit IDs in the serial interface descriptions.


Aug 11 2008   1:37PM GMT

What happened to the telnet client in Windows Vista?



Posted by: Yasir Irfan
Networking, Windows Vista, Telnet

As we all know how important is a Telnet client.  But by default, Telnet client is not installed with Windows Vista, but you can always install telnet client in Widnows Vista by following the steps below.

1)      Click on Start – Control Panel

Telnet 1

 1)      Click on Programs.

Telnet 2

 3) Click on Turn Windows features on or off.

Telnet 3

4) In the Windows Features dialog box, select the Telnet Client check box.

 Telnet 4

5) Click on OK.

Telnet 5

6) Windows will now install and enable Telnet so it is available from command line.

telnet9

telnet8