mirror of
https://github.com/gravitational/teleport
synced 2024-10-22 02:03:24 +00:00
--cluster flag was ignored for tsh join
Looks like `client.ConnectToNode()` always needs to be given the site name as in "host:port@site" format. We do this for SSH, but forgot to do this for Join. Fixes #504
This commit is contained in:
parent
2f60436d5f
commit
4ce8d5db0d
|
@ -409,7 +409,11 @@ func (tc *TeleportClient) Join(sessionID session.ID, input io.Reader) (err error
|
|||
return trace.NotFound(notFoundErrorMessage)
|
||||
}
|
||||
// connect to server:
|
||||
nc, err := proxyClient.ConnectToNode(node.Addr, tc.Config.HostLogin)
|
||||
fullNodeAddr := node.Addr
|
||||
if tc.SiteName != "" {
|
||||
fullNodeAddr = fmt.Sprintf("%s@%s", node.Addr, tc.SiteName)
|
||||
}
|
||||
nc, err := proxyClient.ConnectToNode(fullNodeAddr, tc.Config.HostLogin)
|
||||
if err != nil {
|
||||
return trace.Wrap(err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue