mirror of
https://github.com/gravitational/teleport
synced 2024-10-22 10:13:21 +00:00
Add tip about TELEPORT_LOGIN to user manual (#3296)
This commit is contained in:
parent
22d362fa74
commit
3fd805fe4a
|
@ -474,12 +474,24 @@ most of them can be mitigated.
|
|||
the current proxy will be saved in your `~/.tsh` profile and won't be needed
|
||||
for other `tsh` commands.
|
||||
|
||||
* `tsh ssh` operates _two_ usernames: one for the cluster and another for the
|
||||
2. `tsh ssh` operates _two_ usernames: one for the cluster and another for the
|
||||
node you are trying to log into. See [User Identities](#user-identities)
|
||||
section below. For convenience, `tsh` assumes `$USER` for both by default.
|
||||
But again, if you use `tsh login` before `tsh ssh`, your Teleport username
|
||||
will be stored in `~/.tsh`.
|
||||
|
||||
If you'd like to set the login name that should be used by default on the remote host, you can set the `TELEPORT_LOGIN` environment variable.
|
||||
|
||||
```bash
|
||||
$ echo $USER
|
||||
test
|
||||
$ tsh ssh testnode
|
||||
error: access denied to test connecting to testnode on cluster testcluster
|
||||
$ export TELEPORT_LOGIN=root
|
||||
$ tsh ssh testnode
|
||||
root@testnode:~#
|
||||
```
|
||||
|
||||
!!! tip "Tip":
|
||||
To avoid typing `tsh ssh user@host` when logging into servers,
|
||||
you can create a symlink `ssh -> tsh` and execute the symlink. It will
|
||||
|
|
Loading…
Reference in a new issue