Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 23 if __name__ == "__main__":
- 24 for host in hosts:
- 26 s = paramiko.SSHClient()
- 28 s.load_system_host_keys()
- 29 s.connect(host.strip(),port,allow_agent=True)
- 30 for command in comms:
- 31 stdin, stdout, stderr = s.exec_command(command)
- 32 print stdout.read() + stderr.read()
- 33
- 34 s.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement