In /etc/ssh/sshd_config, there is an option called AcceptEnv that allows the ssh client to send environment variables. I need to be able to send a large number of environment variables, how can i do this?
Asked
Active
Viewed 4,398 times
4
-
Related: https://serverfault.com/questions/427522/why-is-acceptenv-considered-insecure – Deer Hunter Jul 03 '15 at 10:26
1 Answers
6
You can specify multiple environment variables on one line with AcceptEnv
, and you can even give the option multiple times if you want.
For example:
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
The man page also stated this:
Multiple environment variables may be separated by whitespace or spread across multiple AcceptEnv directives.

Michael Hampton
- 244,070
- 43
- 506
- 972