I'm trying to ssh to some hosts with fabric but I get an authentication error, though the username and passwords of my routers are admin/admin.
g = ThreadingGroup('192.168.255.68', '192.168.254.108', user='admin', port=22, connect_kwargs={'password': 'admin'})
g.run('version')
{<Connection host=192.168.255.68 user=admin>: AuthenticationException('Authentication failed.'), <Connection host=192.168.254.108 user=admin>: AuthenticationException('Authentication failed.')}
With debug enabled I see:
DEBUG:2022-02-21 03:27:12,044:Trying discovered key b'.......4b7dc25cb5d87a6a' in /home/user/.ssh/id_rsa
DEBUG:2022-02-21 03:27:12,087:userauth is OK
INFO:2022-02-21 03:27:12,145:Authentication (publickey) failed.
DEBUG:2022-02-21 03:27:12,186:EOF in transport thread
DEBUG:2022-02-21 03:27:12,187:Encountered exception AuthenticationException('Authentication failed.') in thread for 'thread_worker'
Why is it even looking at id_rsa key, when I am specifically asking to authenticate with a password?
Figured it out by using "look_for_keys:False" inside connect_kwargs