Guest User

Untitled

a guest
Feb 19th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.01 KB | None | 0 0
  1. >>> t = paramiko.Transport((hostname, port))
  2. >>> t.connect(username=username, password=password)
  3. No handlers could be found for logger "paramiko.transport"
  4. Traceback (most recent call last):
  5. File "<stdin>", line 1, in <module>
  6. File "C:Python27libsite-packagesparamikotransport.py", line 1073, in connect
  7. self.start_client()
  8. File "C:Python27libsite-packagesparamikotransport.py", line 493, in start_client
  9. raise e
  10. ImportError: DLL load failed: %1 is not a valid Win32 application.
  11.  
  12. DEB [20170320-10:23:43.359] thr=1 paramiko.transport: starting thread (client mode): 0x29f2250L
  13. DEB [20170320-10:23:43.359] thr=1 paramiko.transport: Local version/idstring: SSH-2.0-paramiko_2.1.2
  14. DEB [20170320-10:23:43.407] thr=1 paramiko.transport: Remote version/idstring: SSH-2.0-WS_FTP-SSH_7.7
  15. INF [20170320-10:23:43.407] thr=1 paramiko.transport: Connected (version 2.0, client WS_FTP-SSH_7.7)
  16. DEB [20170320-10:23:43.407] thr=1 paramiko.transport: kex algos:[u'diffie-hellman-group1-sha1', u'diffie-hellman-group14-sha1'] server key:[u'ssh-dss', u'ssh-rsa'] client encrypt:[u'aes256-ctr', u'aes192-ctr', u'aes128-ctr', u'3des-cbc'] server encrypt:[u'aes256-ctr', u'aes192-ctr', u'aes128-ctr', u'3des-cbc'] client mac:[u'hmac-sha1', u'hmac-sha1-96'] server mac:[u'hmac-sha1', u'hmac-sha1-96'] client compress:[u'none'] server compress:[u'none'] client lang:[u''] server lang:[u''] kex follows?False
  17. DEB [20170320-10:23:43.407] thr=1 paramiko.transport: Kex agreed: diffie-hellman-group1-sha1
  18. DEB [20170320-10:23:43.407] thr=1 paramiko.transport: Cipher agreed: aes128-ctr
  19. DEB [20170320-10:23:43.407] thr=1 paramiko.transport: MAC agreed: hmac-sha1-96
  20. DEB [20170320-10:23:43.407] thr=1 paramiko.transport: Compression agreed: none
  21. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: Unknown exception: DLL load failed: %1 is not a valid Win32 application.
  22. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: Traceback (most recent call last):
  23. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagesparamikotransport.py", line 1783, in run
  24. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: self.kex_engine.parse_next(ptype, m)
  25. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagesparamikokex_group1.py", line 75, in parse_next
  26. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: return self._parse_kexdh_reply(m)
  27. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagesparamikokex_group1.py", line 111, in _parse_kexdh_reply
  28. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: self.transport._verify_key(host_key, sig)
  29. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagesparamikotransport.py", line 1628, in _verify_key
  30. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: key = self._key_info[self.host_key_type](Message(host_key))
  31. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagesparamikorsakey.py", line 59, in __init__
  32. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: ).public_key(default_backend())
  33. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagescryptographyhazmatbackends__init__.py", line 74, in default_backend
  34. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: _default_backend = MultiBackend(_available_backends())
  35. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagescryptographyhazmatbackends__init__.py", line 31, in _available_backends
  36. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: "cryptography.backends"
  37. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagespkg_resources__init__.py", line 2308, in resolve
  38. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: module = __import__(self.module_name, fromlist=['__name__'], level=0)
  39. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagescryptographyhazmatbackendsopenssl__init__.py", line 7, in <module>
  40. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: from cryptography.hazmat.backends.openssl.backend import backend
  41. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagescryptographyhazmatbackendsopensslbackend.py", line 16, in <module>
  42. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: from cryptography import utils, x509
  43. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagescryptographyx509__init__.py", line 7, in <module>
  44. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: from cryptography.x509.base import (
  45. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagescryptographyx509base.py", line 16, in <module>
  46. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: from cryptography.x509.extensions import Extension, ExtensionType
  47. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagescryptographyx509extensions.py", line 19, in <module>
  48. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: from cryptography.hazmat.primitives import constant_time, serialization
  49. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: File "C:Python27libsite-packagescryptographyhazmatprimitivesconstant_time.py", line 9, in <module>
  50. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: from cryptography.hazmat.bindings._constant_time import lib
  51. ERR [20170320-10:23:43.780] thr=1 paramiko.transport: ImportError: DLL load failed: %1 is not a valid Win32 application.
  52. ERR [20170320-10:23:43.780] thr=1 paramiko.transport:
  53.  
  54. import paramiko
  55.  
  56. ssh = paramiko.SSHClient()
  57. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  58. ssh.connect('192.168.5.7', username='user', password='mysecretkeya')
  59. uptime = ssh.exec_command("uptime")
  60. print uptime
  61.  
  62. pip install --upgrade --force paramiko
Add Comment
Please, Sign In to add comment