diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-11-04 10:10:16 -0500 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-11-04 10:10:16 -0500 |
commit | 30a7afcdc74443c74f2ebb344a1fbf235c23bf57 (patch) | |
tree | 8d4acdf8a79ae564cfe16e9336ea8455a86f73af /paramiko/agent.py | |
parent | 9e67e71377cea9adaaeab6dbb024f2af94ba7999 (diff) | |
parent | 4565fb517ceb54aa994ff96380b2c8f24df43968 (diff) |
Merge branch 'master' into switch-to-cryptography
Conflicts:
.travis.yml
paramiko/ecdsakey.py
paramiko/transport.py
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 |