securely set environment variables per user

Nico Kadel-Garcia nkadel at gmail.com
Wed Aug 8 08:37:58 EST 2012


On Tue, Aug 7, 2012 at 5:14 PM, Christoph Anton Mitterer
<calestyo at scientia.net> wrote:
> Hi.
>
> Is there a way to securely set environment variables per user on the
> remote side?

That's not an SSH problem. That's a shell environment problem. If the
normal user shell reads ordinary, user modifiable configuration files
such as "$HOME/.profile", "$HOME/.bashrc", or "$HOME/.cshrc", you are
out of luck. this level of environment management requires a
restricted shell.

> What I want is e.g. that I determine on the remote side, that user foo
> should always have PATH set to "blafasl".

The normal way to do that is in the shell configuration used by each
user. In theory.

Why are you trying to do this?


More information about the openssh-unix-dev mailing list