Guest User

Untitled

a guest
Nov 29th, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. def jz_orion_ssh_sout_list(cmd):
  2. with paramiko.SSHClient() as ssh:
  3. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  4. ssh.connect(orion['host'], username=orion['username'], password=orion['password'])
  5. ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command(cmd)
  6. sout = ssh_stdout.readlines()
  7. serr = ssh_stderr.readlines()
  8. return sout
Add Comment
Please, Sign In to add comment