You are not logged in.

#1 2022-05-04 02:12:18

Registered: 2022-04-27
Posts: 2

SSH, remote command does not have locales set

I have a bunch of scripts that I run remotely via SSH as in "ssh user@server -- terminal-program" or "ssh -t user@server -- terminal-program".

When I ssh into a non-arch box (Debian, Ubuntu) the remote session has all locales set. When I ssh into an Arch all locales are set to POSIX. A simple test "ssh user@server -- locale" produces UTF-8 locales when remoting to an Ubuntu server and POSIX on an Arch server.

Is there a way I could configure SSHD on Arch to force remote locales for the incoming SSH connections?

Last edited by cherio (2022-05-04 02:55:22)


#2 2022-05-04 05:26:20

Registered: 2012-08-01
Posts: 826

Re: SSH, remote command does not have locales set

In “sshd_config” see AcceptEnv. On client side, in your SSH configuration set SendEnv for the variables you want to expose to the server.

Remember that environment variables are consumed by the process that runs remotely. So the locale set by LANG must be available on the remote machine, because that’s where the process runs.

Sometimes I seem a bit harsh — don’t get offended too easily! PGP: 7C848198AE93D3BB


Board footer

Powered by FluxBB