You can enable sending an SSH agent for a session in paramiko using AgentRequestHandler . To do this, call paramiko.agent.AgentRequestHandler(s)using the session s. For instance:
client = paramiko.client.SSHClient()
client.connect(host, port, username)
s = client.get_transport().open_session()
paramiko.agent.AgentRequestHandler(s)
See this post for more details and code.
source
share