Skip to content

Commit

Permalink
Fix ipv6 detection in hostname handling of ssh client
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-hb committed Feb 20, 2025
1 parent 72d2e67 commit dfdca6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/provider/ssh/ssh_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func NewSSHClient(ctx context.Context, config SSHConfig) (*SSHClient, error) {
}

host := config.Host
isIpv6 := net.ParseIP(config.Host).To16() == nil
isIpv6 := net.ParseIP(config.Host).To16() != nil
if isIpv6 {
host = fmt.Sprintf("[%s]", config.Host)
}
Expand Down

0 comments on commit dfdca6d

Please sign in to comment.