fix: Fixed the issue where the final connection verification failed when the domain name contains .

This commit is contained in:
feng
2025-09-18 14:06:33 +08:00
committed by feng626
parent 9249aba1a9
commit 46da05652a

View File

@@ -227,7 +227,7 @@ class SSHClient:
gateway_args = self.module.params['gateway_args'] or '' gateway_args = self.module.params['gateway_args'] or ''
pattern = ( pattern = (
r"(?:sshpass -p ([^ ]+))?\s*ssh -o Port=(\d+)\s+-o StrictHostKeyChecking=no\s+" r"(?:sshpass -p ([^ ]+))?\s*ssh -o Port=(\d+)\s+-o StrictHostKeyChecking=no\s+"
r"([\w@]+)@([\d.]+)\s+-W %h:%p -q(?: -i (.+))?'" r"([^@\s]+)@([^\s]+)\s+-W %h:%p -q(?: -i ([^']+))?'"
) )
match = re.search(pattern, gateway_args) match = re.search(pattern, gateway_args)
if not match: if not match: