Add tip about TELEPORT_LOGIN to user manual (#3296)

This commit is contained in:
Gus Luxton 2020-01-21 14:29:17 -04:00 committed by GitHub
parent 22d362fa74
commit 3fd805fe4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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