def agent_auth(transport, username):
agent = paramiko.Agent()<EOL>agent_keys = agent.get_keys()<EOL>if len(agent_keys) == <NUM_LIT:0>:<EOL><INDENT>return<EOL><DEDENT>for key in agent_keys:<EOL><INDENT>print("<STR_LIT>" % hexlify(key.get_fingerprint()))<EOL>try:<EOL><INDENT>transport.auth_publickey(username, key)<EOL>print("<STR_LIT>")<EOL>return<EOL><DEDENT>except paramiko.SSHException:<EOL><INDENT>print("<STR_LIT>")<EOL><DEDENT><DEDENT>
Attempt to authenticate to the given transport using any of the private
keys available from an SSH agent.