You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
The above code runs successfully.
Actual behaviour
The above code got exception:
Traceback (most recent call last):
File "/home/azureuser/.local/lib/python3.10/site-packages/pssh/clients/base/single.py", line 204, in _auth_retry
self.auth()
File "/home/azureuser/.local/lib/python3.10/site-packages/pssh/clients/base/single.py", line 364, in auth
return self._identity_auth()
File "/home/azureuser/.local/lib/python3.10/site-packages/pssh/clients/base/single.py", line 337, in _identity_auth
raise AuthenticationError("No authentication methods succeeded")
pssh.exceptions.AuthenticationError: No authentication methods succeeded
...
pssh.exceptions.AuthenticationError: ('Authentication error while connecting to %s:%s - %s - retries %s/%s', 'localhost', 22, AuthenticationError('No authentication methods succeeded'), 3, 3)
Additional information
The issue happens when no auth is needed, e.g., SSH to localhost, or to a host without the need of -i. The ParallelSSHClient's constructor takes identity_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!
The text was updated successfully, but these errors were encountered:
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!The text was updated successfully, but these errors were encountered: