- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
03-26-2020 07:25 AM
I have a simple script that used to work but not any longer. It now hangs during the "load_system_host_keys()". I have even tried using user parameters, which is commented out, but still it hangs. Any idea why it can't connect either via ssh key or user info? Your input is greatly appreciated.
import paramiko
ssh_client = paramiko.SSHClient()
ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh_client.load_system_host_keys()
ssh_client.connect(device)
# ssh_client.connect(device,port=22,username=‘username’,password=‘password’)
remote_conn = ssh_client.invoke_shell()
print "Interactive SSH session established"
remote_conn.send('set cli pager off \n')
remote_conn.send('set cli config-output-format set \n')
remote_conn.send('configure \n')
remote_conn.send('show \n')
remote_conn.send('exit \n')
remote_conn.send('exit \n')
04-01-2020 01:23 AM
@benatddsnetwork.com Did you recently update your PanOS? We had a problem with scp after upgrade to 8.1.13 and the response from support was that they had fixed a few OpenSSH vulnerabilities in the recent update, which changed some ssh/scp behaviour.
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!