summaryrefslogtreecommitdiffhomepage
path: root/paramiko/agent.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2015-11-04 14:45:01 -0800
committerJeff Forcier <jeff@bitprophet.org>2015-11-04 14:45:01 -0800
commitecf3a820323d7821c30ef4b568cb885b381e368a (patch)
treeed2c9625db49edc63fc6389d5d1c303740b508b3 /paramiko/agent.py
parent49072f3537a8981e9d448c22481a1d2b92c03643 (diff)
parent2a99a8c9a4bde66720e9357963ce1896830528a1 (diff)
Merge branch 'master' into 562-int
Diffstat (limited to 'paramiko/agent.py')
-rw-r--r--paramiko/agent.py20
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