cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4376
Views
0
Helpful
1
Replies

how to specify more than one command in plink.exe while SSHing the PIX ?

nacholariguet
Level 1
Level 1

eg: plink -ssh -m commands.txt somebody@pix.somewhere.com -pw xxx

where commands.txt is:
enable
xxx
show version
logout

which works fine but, is there a way to use something like:

plink -ssh somebody@pix.somewhere.com -pw xxx enable^nxxx^nshow version^nlogout^n

to avoid creating/deleting the associated command file from a batch file (possibly leaving passwords on a temp one) ?

1 Reply 1

Panos Kampanakis
Cisco Employee
Cisco Employee

If you want to do that in a script you would need to have the script parse the output sent back from the ASA in order to send the next command.

You cannot send the commands to the ASA without expecting for the output when you are putting in the enable password on the ASA.

You can use "expect" to do that in Linux.

I hope it helps.

PK

Review Cisco Networking for a $25 gift card