How does the AcceptEnv and PermitUserEnvironment directives in the sshd_config file work ?

Solution Verified - Updated -

Issue

  • How does AcceptEnv and PermitUserEnvironment work?
  • Can you please explain sshd_config - AcceptEnv vs PermitUserEnvironment directives?
  • If I configure "PermitUserEnvironment no" in /etc/ssh/sshd_config, then users can no longer send environment variables AND any items being sent from the client with "SendEnv" will no longer be accepted, correct?"
  • If this is the case, we can then remove the "AcceptEnv" directives in /etc/ssh/sshd_config as long as "PermitUserEnvironment no" is configured.

Environment

  • Red Hat Enterprise Linux
  • Openssh-server

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content