Advertisement
Guest User

Untitled

a guest
Apr 25th, 2016
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. Exception in thread Thread-3:
  2. Traceback (most recent call last):
  3. File "C:Python27libthreading.py", line 801, in __bootstrap_inner
  4. self.run()
  5. File "C:Python27libsite-packagesparamikoagent.py", line 117, in run
  6. raise AuthenticationException("Unable to connect to SSH agent")
  7.  
  8. privkey = paramiko.RSAKey.from_private_key_file(PrivKeyDirFile, password = PrivKeyPw)
  9.  
  10. # Start the client
  11. client = paramiko.client.SSHClient()
  12. client.set_missing_host_key_policy(paramiko.client.AutoAddPolicy())
  13. client.load_system_host_keys()
  14. client.connect(hostname = Host, username = User, pkey = privkey)
  15. # get a session
  16. sshChannel = client.get_transport().open_session()
  17. # set up the agent request handler to handle agent requests from the server
  18. paramiko.agent.AgentRequestHandler(sshChannel) # <--UNDOCUMENTED??!!
  19. # get a shell
  20. sshChannel.get_pty()
  21. sshChannel.invoke_shell()
  22.  
  23. # SNIP
  24.  
  25. sshChannel.send
  26.  
  27. ("command-which-invokes-fab-scriptn")
  28. # error now happens
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement