How to connect to multiple servers through ssh with different hosts & passwords in python?
I've tried to use Parallel-ssh. But I was unable to connect to multiple servers that had a different password.
Example from there documentation for a single server:
from pssh.clients import ParallelSSHClient
hosts = ['host1', 'host2', 'host3']
client = ParallelSSHClient(hosts, user='my_user', password='my_pass')
You might be interested in
fabric
. It provides similar functionality, but also allows you to manually create each connection and then pass them into a group. For example: