pytest-testinfra
pytest-testinfra copied to clipboard
SSH backend prompts for password 3x
When using ssh as a backend and using password for authentication, i get prompted for a password 3x. However when I ssh directly ssh [email protected]
, there is only 1 prompt.
Using sshpass
doesnt work at all as well and I suspect that it is due to multiple password prompts.
Is this a known issue and is it possible to make the output more verbose for debugging, eg from ssh
If you don't use ssh-agent, password will be promted for each command testinfra need to run over ssh (for instance using host.package()
require some commands to be run to detect package manager).
@elfgoh / @philpep could you explain how you have used ssh backend connection with password authentication. I am trying the same for my use case and not sure how to specify the password!
@ruheenaansari34: You can specify the password along with the user in the get_host
URL: ssh://<user>:<password>@<host>
. This requires sshpass
to be installed, though.