Putty Serial Break Sequence Cisco

Posted on
Putty Serial Break Sequence Cisco Rating: 7,7/10 128 votes

Next, you need to find out is which device your serial (including the USB adapter) ports are mapped to. The easiest way to do this is to connect the console cable to a running Cisco device. Now open up a Terminal using 'Applications > Accessories > Terminal' and type this command: dmesg grep tty. How to send a break to a serially attached device within a telnet session to the CS9000 or the Iolan SDS serial port. Solution: Most Telnet clients have command line options such as sending a telnet break command. PuTTY offers a Special Command -> Break when in a telnet session.

  1. Cisco Break Key
Active1 year, 2 months ago

I am trying to run a set of show commands on a Cisco switch using PuTTY on Windows.

I am not able to use anything other than putty.exe (no Plink, expect, anything!).

I am running the following command in an elevated PowerShell window:

Cisco Break Key

*The 'Cisco' configuration just sets it so it logs the console window to a text file.

The contents of the ciscoCMDs.txt are as follows:

When I run the command in an elevated PowerShell window PuTTY launches and says:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log IPADDRESS 11:58:44 =~=~=~=~=~=~=~=~=~=~=~= Using username 'Username'.
Line has invalid autocommand 'show version show vlan'

If I place a ! at the end of first line..

It runs the show version command, but does not run the show vlan command.

How can I get the second command to run? (I intend on placing several more commands there, but if the second command can run there should be no reason the third.. nth.. wont run.)

Is there a configuration in the PuTTY profile I need to set up for End of File or End of Line?

Is there a special character I need to add at the end of the line to make it so it knows a second command is coming?

Key

Just to be crystal clear:

  1. I am only able to use PuTTY and SSH to access a Cisco switch.
  2. I can not use any other files or programs other than putty.exe, the SSH connection, and the commands.txt files housing a list of commands.
  3. I would like to run multiple show commands from one .txt file and have the output of the commands logged using a single PuTTY profile and a single command run via PowerShell.

********EDIT************

I need to send a 0d0a in hex to the CLI. Does anyone know how to do that? n and r do not work. Is there a way to specifiy to the cisco IOS that the information it is viewing is in Hex?

JohnKubik
JohnKubikJohnKubik

1 Answer

It's actually a known limitation of Cisco, that it does not support multiple commands in an SSH 'exec' channel command.

Quoting section 3.8.3.6 -m: read a remote command or script from a file of PuTTY/Plink manual:

With some servers (particularly Unix systems), you can even put multiple lines in this file and execute more than one command in sequence, or a whole shell script; but this is arguably an abuse, and cannot be expected to work on all servers. In particular, it is known not to work with certain ‘embedded’ servers, such as Cisco routers.

Using Plink with an input redirection may solve the problem. Ms project 2013 free download full version with product key.

If you are really stuck with PuTTY, then as a really gross hack, you can send key strokes with your PowerShell script to the putty.exe subprocess.

Putty Serial Break Sequence CiscoMartin PrikrylMartin Prikryl
103k27 gold badges214 silver badges451 bronze badges
Cisco break key

Not the answer you're looking for? Browse other questions tagged windowspowershellsshputtycisco or ask your own question.