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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.