Skip to content

Commit 8caf9c1

Browse files
committed
feat(ssh): support to login remote host via ipv6 address
support to use ipv6 address and its port to login remote host. ref #11
1 parent aca7422 commit 8caf9c1

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)