Reply
Highlighted

Python Paramiko

johnpape
Techie
Posts: 4
3607     0

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.

Re: Python Paramiko

anewscript
Techie
Posts: 2
3608     0

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

Re: Python Paramiko

[ Edited ]
abigailbr0wn
Techie
Posts: 1
3608     0

 

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

 

Showing results for 
Search instead for 
Do you mean 

Recommended for You