Run operational command using SSH

Announcements

ATTENTION Customers, All Partners and Employees: The Customer Support Portal (CSP) will be undergoing maintenance and unavailable on Saturday, November 7, 2020, from 11 am to 11 pm PST. Please read our blog for more information.

Reply
Highlighted
L2 Linker

Run operational command using SSH

I need to automate run particular operational commands , which were not available in the API. I tried running them using SSH to the Panorama CLI, but it fails. Also Paramiko Python script does not seem to work and not sure what are we doing wrong. 

Can you please share any experience exectuing SSH commands? 

Highlighted
L4 Transporter

Can you provide an example of what you're trying to do?

Highlighted
L2 Linker

@batd2 

 

I've used bash scripts for this. You'll want to use ssh keys for the user authentication. Here is an example on how to dump the idmgr cache:

 

#! /bin/bash

ssh -t -t <username>@<device> << EOF

set cli pager off

debug device-server dump idmgr type vsys-region all

quit

EOF

Highlighted
L1 Bithead

you can try by window power shell script.

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 Live Community as a whole!

The Live Community thanks you for your participation!