Add support for SSH's env command to the server #136

wants to merge 1 commit into


None yet

4 participants


This commit adds support for the env command to the server, with a default implementation to reject all requests (which both preserves backwards compatibility, and is the safest default).

ludoo commented Sep 19, 2013

Wouldn't it make more sense for the default to return the server's environment variable value? If the client requests env LC_PAPER it usually expects to get back the user's LC_PAPER value on the server's env.


@ludoo Opening a shell on the remote side and asking it to evaluate an environment variable, as you refer to, is different from telling SSH to set a remote environment variable. env requests are passed name/value pairs; there is no other reasonable thing they could be used to do, other than setting an environment variable on the remote side with the given value.

ludoo commented Sep 19, 2013

Right, it makes sense. :)


This looks like it's implementing section 6.4 of RFC-4254: . While I've not used it myself I presume this is what powers the SendEnv client option? :) Given it's in the RFC and it's real simple I'm happy to merge w/o doing a ton of rigorous testing.

@bitprophet bitprophet added a commit that referenced this pull request Sep 28, 2013
@bitprophet bitprophet Changelog re #136 88b568b

Rebased/merged, thanks!

@bitprophet bitprophet closed this Sep 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment