Skip to content

Commit

Permalink
Apply SSH config host only to the matched host
Browse files Browse the repository at this point in the history
  • Loading branch information
mingan committed Mar 7, 2018
1 parent 829e6de commit 7e3e816
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/sup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,12 @@ func main() {
}

// check network.Hosts for match
for _, host := range network.Hosts {
for i, host := range network.Hosts {
conf, found := confMap[host]
if found {
network.User = conf.User
network.IdentityFile = resolvePath(conf.IdentityFile)
network.Hosts = []string{fmt.Sprintf("%s:%d", conf.HostName, conf.Port)}
network.Hosts[i] = fmt.Sprintf("%s:%d", conf.HostName, conf.Port)
}
}
}
Expand Down

0 comments on commit 7e3e816

Please sign in to comment.