Open ItamarIn opened 1 year ago
A workaround, in case other people stumble on this, can be:
import paramiko
server = SSHTunnelForwarder(
remote_host,
# https://stackoverflow.com/questions/54213831/paramiko-or-sshtunnel-and-ssh-agent-without-entering-passphrase
ssh_pkey=paramiko.agent.Agent().get_keys(),
...
)
When I passed allow_agent=False to SSHTunnelForwarder object it still trying to connect using ssh keys. even the documentation said it will pass look_for_keys=False
output:
17:01:17.620 | Connected (version 2.0, client OpenSSH_for_Windows_8.9) 17:01:17.777 | Authentication (publickey) failed. 17:01:17.820 | Connected (version 2.0, client OpenSSH_for_Windows_8.9) 17:01:17.971 | Authentication (publickey) failed. 17:01:18.015 | Connected (version 2.0, client OpenSSH_for_Windows_8.9) 17:01:18.173 | Authentication (password) successful!
version: 0.4.0