Advertisement
oquidave

ssh problem

May 14th, 2011
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #!/usr/bin/env python
  2. #ssh module
  3. import paramiko
  4.  
  5. ssh1 = paramiko.SSHClient()
  6. ssh1.set_missing_host_key_policy(paramiko.AutoAddPolicy)
  7. ssh1.connect(hostname = '192.168.2.178', port = 25, username='dokwii', password='okwi1478')
  8. stdin, stdout, sterr = ssh1.exec_command('/sbin/ifconfig')
  9. print stdout.read()
  10. ssh.close()
  11.  
  12. traceback
  13.  
  14. return getattr(self._sock,name)(*args)
  15. socket.error: [Errno 111] Connection refused
  16. Exception AttributeError: "'NoneType' object has no attribute 'print_exc'" in <bound method DevURandomRNG.__del__ of <Crypto.Random.OSRNG.posix.DevURandomRNG object at 0x81c548c>> ignored
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement