ParallelSSH / parallel-ssh

Asynchronous parallel SSH client library.
https://parallel-ssh.org
GNU Lesser General Public License v2.1
1.2k stars 149 forks source link

HostOutput has empty host when authentication fails #297

Closed whuizhe closed 3 years ago

whuizhe commented 3 years ago

Here's my output host=None exit_code=None channel=None exception=('Authentication error while connecting to %s:%s - %s', '10.201.64.106', 22, AuthenticationError('No authentication methods succeeded')) encoding=utf-8 read_timeout=None

When the authentication fails, the host is empty, this time do not know is that ip failure

pkittenis commented 3 years ago

Hi there,

Thanks for the interest. Host is available on the exception as the first argument, host_out.exception.args[0] as can be seen above.

Should have it as host_out.host as well, yes.

wfleurant commented 3 years ago

using jumphost / proxy to unreachable target host (host_out.exception):
('Proxy authentication failed. Exception from tunnel client: %s', SocketDisconnectError())

pkittenis commented 3 years ago

Resolved by #323