Advertisement
Guest User

Untitled

a guest
Dec 11th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. File "/Library/Python/2.7/site-packages/paramiko/client.py", line 467, in invoke_shell
  2. chan.update_environment_variables(environment or {})
  3. AttributeError: 'Channel' object has no attribute 'update_environment_variables'
  4.  
  5. def init_connect():
  6. global tun
  7. ssh = paramiko.SSHClient()
  8. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  9.  
  10. print "nnAttempting connection to ", device_ip, " via SSH"
  11. ssh.connect(device_ip,username=username,password=password,timeout=5)
  12. print "Connection established."
  13.  
  14. tun = ssh.invoke_shell()
  15. output = tun.recv(1000)
  16.  
  17. print output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement