mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Added support for -vvvv to enable ssh connection debugging
This patch also checks specifically for a return code of 255, which indicates an unknown SSH error of some kind. When that happens, ansible will now recommend running with -vvvv (if not enabled) or show the output from 'ssh -vvv' (when it is enabled)
This commit is contained in:
@@ -147,7 +147,13 @@ class Connection(object):
|
||||
''' run a command on the remote host '''
|
||||
|
||||
ssh_cmd = self._password_cmd()
|
||||
ssh_cmd += ["ssh", "-tt", "-q"] + self.common_args
|
||||
ssh_cmd += ["ssh", "-tt"]
|
||||
if utils.VERBOSITY > 3:
|
||||
ssh_cmd += ["-vvv"]
|
||||
else:
|
||||
ssh_cmd += ["-q"]
|
||||
ssh_cmd += self.common_args
|
||||
|
||||
if self.ipv6:
|
||||
ssh_cmd += ['-6']
|
||||
ssh_cmd += [self.host]
|
||||
|
||||
Reference in New Issue
Block a user