Skip to content

Commit

Permalink
Fix IPv6 handling
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMatti committed Dec 17, 2023
1 parent 9adc252 commit 1152bdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libvirt/uri/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (u *ConnectionURI) dialSSH() (net.Conn, error) {
port = defaultSSHPort
}

sshClient, err := ssh.Dial("tcp", fmt.Sprintf("%s:%s", u.Hostname(), port), &cfg)
sshClient, err := ssh.Dial("tcp", net.JoinHostPort(hostname, port), &cfg)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 1152bdd

Please sign in to comment.