Open PPPW opened 1 year ago
Same issue. Can you please fix this?
hello, agreed. I've experienced this problem for 2 years.
this post indicates there is a different way to import the ParallelSSHClient
.
Trying this seems to work. It must be loading a different method (from ssh-python
) that handles the key-based authentication.
So now the front-page example works on Ubuntu 22.04 with Python 3.10.12 and openssh-serve
version 1:8.9p1-3ubuntu0.7 amd64
#from pssh.clients import ParallelSSHClient <-- not working
from pssh.clients.ssh.parallel import ParallelSSHClient # <-- working
hosts = ['localhost', 'localhost']
client = ParallelSSHClient(hosts)
output = client.run_command('uname')
for host_output in output:
for line in host_output.stdout:
print(line)
exit_code = host_output.exit_code
For general questions please use the mail group.
Describe the bug The example in the README is broken:
To Reproduce Run the above example.
Expected behavior The above code runs successfully.
Actual behaviour The above code got exception:
Additional information The issue happens when no auth is needed, e.g., SSH to localhost, or to a host without the need of
-i
. TheParallelSSHClient
's constructor takesidentity_auth=False
, however with that, in/pssh/clients/base/single.py
, it will try to do password auth, which also doesn't apply. This looks like a regression. Could you fix that and support uses cases that auth is not needed? Thank you!