teleport/tool/tsh/help.go
Sasha Klizhentas e570b24eeb Update tsh login to select clusters.
The following changes have been introduced
to tsh login behavior:

1. tsh login now accepts cluster name
as an optional positional argument:

$ tsh login clustername

2. If tsh login is called without arguments
and the current credentials are valid,
tsh login now prints status, previous behavior
always forced login:

$ tsh login
... print status if logged in...

2. If tsh login is called with the proxy
equal to current, tsh login selects cluster,
otherwise it will re-login to another proxy:

$ tsh login one
... selected cluster one

$ tsh login two
... selected cluster two

$ tsh login --proxy=example.com three
... selected cluster three because
proxy is the same

$ tsh login --proxy=acme.example.com four
...will switch to proxy acme.example.com
and cluster four
2018-06-25 18:28:46 -07:00

21 lines
557 B
Go

package main
const (
// loginUsageFooter is printed at the bottom of `tsh help login` output
loginUsageFooter = `NOTES:
The proxy address format is host:https_port,ssh_proxy_port
EXAMPLES:
Use ports 8080 and 8023 for https and SSH proxy:
$ tsh --proxy=host.example.com:8080,8023 login
Use port 8080 and 3023 (default) for SSH proxy:
$ tsh --proxy=host.example.com:8080 login
Login and select cluster "two":
$ tsh --proxy=host.example.com login two
Select cluster "two" using existing credentials and proxy:
$ tsh login two`
)