10-18-2016 02:31 PM
Has anyone gotten a python paramiko script to connect and execute a command against a grid member?
My script can connect to sshd on Linux or other network appliances.
10-21-2016 01:40 PM
I havent tried this yet, however we are looking at using ansible modules that are already out in the Galaxy repo to interact with our grid
11-28-2018 06:53 AM - edited 11-28-2018 06:55 AM
import paramiko ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(hostname='192.168.10.10', username='ubuntu', key_filename='/home/ubuntu/.ssh/mykey.pem') stdin, stdout, stderr = ssh.exec_command('lsb_release -a') for line in stdout.read().splitlines(): print(line) ssh.close()
Using this for executing remote Bash Commands, can't rework it to grid member for last 2 days. Maybe someone can help here? don't want to start the new branch through.
best site to buy research paper
09-23-2020 08:01 PM
Below is my simple ssh() to execute a command on a grid member but doesn't work. It works on a cisco router or linux host, but won't work on Infoblox. Any idea?
def ssh(device, username, password):
client = paramiko.SSHClient()
client.connect(device, username=username, password=password)
cmd = 'show status'
stdin, stdout, stderr = client.exec_command(cmd)
result = stdout.read()
09-24-2020 08:51 AM
What's the error you are seeing it might help?