File openssh-sendenv.patch of Package openssh
Index: openssh-10.0p1/ssh_config
===================================================================
--- openssh-10.0p1.orig/ssh_config
+++ openssh-10.0p1/ssh_config
@@ -17,6 +17,17 @@
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
+# These options must come before includes in order for user overrides to be
+# effective.
+Host *
+# This enables sending locale enviroment variables LC_* LANG, see ssh_config(5).
+# Also send environment variables useful for terminal identification.
+ SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
+ SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
+ SendEnv LC_IDENTIFICATION LC_ALL
+ SendEnv LC_TERMINAL LC_TERMINAL_VERSION
+ SendEnv COLORTERM TERM_PROGRAM TERM_PROGRAM_VERSION
+
# To modify the system-wide ssh configuration, create a "*.conf" file under
# "/etc/ssh/ssh_config.d/" which will be automatically included below.
# Don't edit this configuration file itself if possible to avoid update
@@ -38,11 +49,6 @@ Host *
# expire after twenty minutes after remote login.
ForwardX11Trusted yes
-# This enables sending locale enviroment variables LC_* LANG, see ssh_config(5).
- SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
- SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
- SendEnv LC_IDENTIFICATION LC_ALL
-
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
Index: openssh-10.0p1/sshd_config
===================================================================
--- openssh-10.0p1.orig/sshd_config
+++ openssh-10.0p1/sshd_config
@@ -5,6 +5,17 @@
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
+# This enables accepting locale enviroment variables LC_* LANG, see sshd_config(5).
+# Also accept environment variables useful for terminal identification.
+# Most configuration options are applied on a first-seen basis, but AcceptEnv
+# is cumulative and can be countermanded by AcceptEnv -*. For this
+# to be effective in user configuration, it needs to go before any includes.
+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
+AcceptEnv LC_TERMINAL LC_TERMINAL_VERSION
+AcceptEnv COLORTERM TERM_PROGRAM TERM_PROGRAM_VERSION
+
# To modify the system-wide sshd configuration, create a "*.conf" file under
# "/etc/ssh/sshd_config.d/" which will be automatically included below.
# Don't edit this configuration file itself if possible to avoid update
@@ -118,11 +129,6 @@ PrintMotd no
# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server
-# This enables accepting locale enviroment variables LC_* LANG, see sshd_config(5).
-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
-
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no