how to specify more than one command in plink.exe while SSHing the PIX ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2009 05:55 PM - edited 03-11-2019 09:42 AM
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) ?
- Labels:
-
NGFW Firewalls
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2009 03:00 PM
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
