Discussion:
[Fab-user] Multiple users and passwords
santosh kumar
2016-04-15 10:05:46 UTC
Permalink
Hi all,

I want to understand if the fabric has the facility to work on multiple
users and passwords .
For say, i have a requirement where i read the names of the hosts and ips
from a file, later redirect it to the @hosts decorator.

The challenge for me that the hosts can be logged in via some passwords.
like

combination 1:
username:root , password:xyz
combination 2:
username:root, password:abc
combination 3:
username:ubuntu,password:ubuntu

so if one combination does not work i want my "fab" to try another
combination. is this possible ?
Do we have a option for this ?

Other details
Fabric==1.10.2

Thanks,
Tuxfux
Brandon Whaley
2016-04-15 13:58:11 UTC
Permalink
That really sounds like a job for ssh keys to me, just setting up key
authentication will go a long way toward uncomplicating your ssh usage. I
also wouldn't use the @hosts decorator if you're pulling in your host list
dynamically. I always recommend using the execute() function if you intend
to run fabric tasks directly from Python code.
Post by santosh kumar
Hi all,
I want to understand if the fabric has the facility to work on multiple
users and passwords .
For say, i have a requirement where i read the names of the hosts and ips
The challenge for me that the hosts can be logged in via some passwords.
like
username:root , password:xyz
username:root, password:abc
username:ubuntu,password:ubuntu
so if one combination does not work i want my "fab" to try another
combination. is this possible ?
Do we have a option for this ?
Other details
Fabric==1.10.2
Thanks,
Tuxfux
_______________________________________________
Fab-user mailing list
https://lists.nongnu.org/mailman/listinfo/fab-user
Loading...