4

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?

Lesmana
  • 2,284
  • 2
  • 17
  • 12
Saryas
  • 43
  • 1
  • 4

1 Answers1

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
  • 237,123
  • 42
  • 477
  • 940