mirror of https://github.com/ansible/ansible.git
Fix ssh connections to IPv6 addresses
We can unconditionally wrap remote_addr in square brackets for scp and sftp (both of which require them for IPv6 addresses), but not wrap them at all for ssh (which doesn't accept them). This way, we don't have to detect and treat IPv6 addresses specially. This works for hostnames, IPv4 addresses, and IPv6 addresses. The earlier code seemed to intend to wrap all IPv6 addresses in square brackets, which would have broken ssh, but it actually made no attempt to detect IPv6 addresses at all (so it broke only with IPv6 addresses for scp and sftp). Based on a review of PR #11677 by @JuiceBoxSingularitypull/11816/head
parent
6d514e18b7
commit
72715c6add
Loading…
Reference in New Issue