dotfiles/.local/bin/ssh

14 lines
547 B
Shell
Executable file

#!/bin/sh
# Mask the exotic `LC_*` values from ~/.config/shell/locale on remote hosts
#
# Debian's /etc/ssh/ssh_config forwards them via `SendEnv LANG LC_*`,
# which cannot be cleared from ~/.ssh/config
# => Send `LC_ALL` on top, which overrides all `LC_*` and `LANG` remotely
#
# `C.UTF-8` is built into `glibc` and thus available on every host
#
# Found via the `$PATH` by `git`, `rsync`, `sshfs`, scripts, and GUI apps;
# `scp` and `sftp` call /usr/bin/ssh directly and have their own wrappers
exec /usr/bin/ssh -o SetEnv=LC_ALL=C.UTF-8 "$@"