Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (23 sloc) 851 Bytes
# Log into PAN Firewall via SSH and restart DNS Proxy which is causing mgmt cpu spike on PAN OS 9.0.3
# Requires Python 2.x
# Setup crontab schedule to automatically execute
import paramiko
import time
USERNAME = 'username'
PASSWORD = 'password'
HOSTNAME = '' #Firewalls IP
PORT = 22
def ssh_command(username=USERNAME, password=PASSWORD, hostname=HOSTNAME, port=PORT):
ssh_client = paramiko.SSHClient()
ssh_client.connect(hostname, port, username, password)
remote_conn = ssh_client.invoke_shell()
#print ("Interactive SSH session established")
remote_conn.send("debug software restart process dnsproxy\n ")
remote_conn.send("exit\n ")
if __name__ == '__main__':
You can’t perform that action at this time.