I am not sure , whether i should i ask this question here or some other stack-exchange community  , but i am trying some simple commands to run on a list of servers , using python fabric. The code for the command:    from fabric.api import run    def host_type():      run('uname -s')This will run the uname -s command on all Linux servers by invoking:  $fab -H < ......Comma, separated , Servers , List , Here.....> host_typeNow the problem is that , how can i run it/configure it such that it returns the results without asking for user/root password during execution. There might be some Linux command line trick but i don't remember.Edit1:Ok there is a -p option with fab command but each server has a different password, so this option may not work for me.
Running a command on all servers using Fabric
linux;python;configuration
There are two ways that you can do that. Fabric uses openssh on the backend so if you already configured passwordless connection then you will not need to set anything and it will work.The other way is simple as well. You only need to set up the env variables.from fabric.state import envenv.user = userenv.password = passwordenv.colorize_errors = Trueenv.connection_attempts = 3env.disable_known_hosts = Trueenv.skip_bad_hosts = Trueenv.parallel = Falseenv.linewise = TrueThis should do the trick. I usually put it in a separate file and import it.PS: I, personally, find paramiko which is the library that Fabric uses is easier to use for simpler tasks.