Skip to content

Commit c8892ed

Browse files
authored
merge(ssh): Merge pull request #14 from genshen/feature-ipv6-address-support
Feature: support to login remote host via ipv6 address
2 parents aca7422 + 8caf9c1 commit c8892ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/utils/ssh_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (node *Node) Connect(username string, auth ssh.AuthMethod) error {
6262
},
6363
}
6464

65-
client, err := ssh.Dial("tcp", node.Host+":"+strconv.Itoa(node.Port), config)
65+
client, err := ssh.Dial("tcp", net.JoinHostPort(node.Host, strconv.Itoa(node.Port)), config)
6666
if err != nil {
6767
return err
6868
}

0 commit comments

Comments
 (0)