Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support User Environment #1014

Closed
russjones opened this issue May 25, 2017 · 1 comment
Closed

Support User Environment #1014

russjones opened this issue May 25, 2017 · 1 comment
Assignees
Milestone

Comments

@russjones
Copy link
Contributor

russjones commented May 25, 2017

When creating a new session with OpenSSH you inherit only a limited number of environment variables:

DISPLAY
HOME
LOGNAME
MAIL
PATH
SSH_ASKPASS 
SSH_AUTH_SOCK
SSH_CONNECTION
SSH_ORIGINAL_COMMAND
SSH_TTY
TZ
USER

After that, if PermitUserEnvironment true is set in sshd_config, sshd will read in ~/.ssh/environment and set these in your environment.

At the moment, Teleport supports the first half (getting the predefined set of environment variables), Teleport should also respect and environment file if it exists and this feature is enabled on the server.

@russjones russjones added this to the 2.2 milestone May 25, 2017
@russjones russjones self-assigned this May 25, 2017
@kontsevoy
Copy link
Contributor

kontsevoy commented May 25, 2017

Implementation details:

Teleport should use ~/.tsh/environment since we've made the earlier decision to NOT reuse ssh directories.

The flag to accept user environment should be supported by the CLI only (for now) for start command, i.e. this should work:

$ export FOO=BAR
$ env > ~/.tsh/environment
$ teleport start --permit-user-env=true

And if you tsh localhost (as yourself) you should see the full environment at the time of teleport start exposed to your session, so echo $FOO will print "BAR".

@kontsevoy kontsevoy added the P0 label May 25, 2017
hatched pushed a commit that referenced this issue Feb 1, 2023
* display audit log events with UTC time

* added UTC to column headers on recordings and audit log

* prettier

* moved utc creation to api response

* move timezone offset to display time function

* removed unused imports

* display date string only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants