Advertisement
Guest User

Untitled

a guest
Mar 12th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. try:
  2. ssh=paramiko.SSHClient()
  3. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  4. ssh.connect(ip,username=user,password=passw,timeout=18)
  5. cmd=ssh.get_transport().open_session()
  6. cmd.settimeout(30)
  7. cmd.exec_command('id')
  8. date=cmd.recv(1024)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement