diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2015-09-30 15:59:05 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2015-09-30 15:59:05 -0700 |
commit | dfaa11af5cc4c1da42f0b61ba5e3c45e6e2e3854 (patch) | |
tree | 05b6432aab5168c086978256c43f3897576e52ba /paramiko/agent.py | |
parent | ff7c400d3d54f233fb5fe82d7233bc2f93f5aab4 (diff) | |
parent | b67ee80ba6cbb985a537123a0ae099b81ddfc999 (diff) |
Merge branch '1.15'
Diffstat (limited to 'paramiko/agent.py')
-rw-r--r-- | paramiko/agent.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/paramiko/agent.py b/paramiko/agent.py index f928881e..6a8e7fb4 100644 --- a/paramiko/agent.py +++ b/paramiko/agent.py @@ -290,6 +290,26 @@ class AgentServerProxy(AgentSSH): class AgentRequestHandler(object): + """ + Primary/default implementation of SSH agent forwarding functionality. + + Simply instantiate this class, handing it a live command-executing session + object, and it will handle forwarding any local SSH agent processes it + finds. + + For example:: + + # Connect + client = SSHClient() + client.connect(host, port, username) + # Obtain session + session = client.get_transport().open_session() + # Forward local agent + AgentRequestHandler(session) + # Commands executed after this point will see the forwarded agent on + # the remote end. + session.exec_command("git clone https://my.git.repository/") + """ def __init__(self, chanClient): self._conn = None self.__chanC = chanClient |