paramiko.ServerInterface.check_channel_forward_agent_request
来接受或拒绝客户端发起的代理转发。
但是文档、代码和OpenSSH代码都没有给出任何指示你下一步做什么。
简短的回答:
def check_channel_forward_agent_request(self, channel):
self.agent = AgentServerProxy(channel.transport)
self.agent.connect()
return True
但是,您还必须调用
AgentServerProxy.close()
,并且可能需要在AgentServerProxy.connect()
之后调用return True
并且响应已返回给客户端。