Scheduling PANOS command using ssh?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Scheduling PANOS command using ssh?

L4 Transporter

I'd like to have a command run on our PAN at a scheduled interval.

I know this can't be done "on-box" but I should be able to schedule a job to connect to the PAN and run the command.

I've been experimenting with plink and whilst I can make it connect and give me an interactive shell, I simply cannot get it to connect and then run the command I want.

The command is simply "clear arp all".

Any suggestions please?  The tool doesn't have to be putty or plink.

Thanks a lot.

2 REPLIES 2

L6 Presenter

How about using some flavor of Unix to execute a cron job to run at your discretion? The cron job can execute a perl script that entails ssh'ng into the pan device and executing the clear arp all command.

Here's an example of the crontab feature:

http://www.pantz.org/software/cron/croninfo.html

-Renato

Hi I recommend you to use a linux environment and the use of the "expect" tool.

Expect is very easy to use and you can create a file containing what command do you want to execute and which is the result we want to expect.

Look this link http://nixcraft.com/shell-scripting/12936-taking-command-line-argument-expect-script.html its an example, If you have any questions can contact me 🙂

Regards

Albert Estevez

  • 4663 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!