You are not logged in.

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

cherio
Member
Registered: 2022-04-27
Posts: 29

[SOLVED] 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-06-02 20:11:56)

Offline

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

mpan
Member
Registered: 2012-08-01
Posts: 1,200
Website

Re: [SOLVED] 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!

Offline

#3 2022-06-02 18:08:35

cherio
Member
Registered: 2022-04-27
Posts: 29

Re: [SOLVED] SSH, remote command does not have locales set

You are right after all. Ubuntu global ssh_config has the following lines "SendEnv LANG LC_*" by default. Arch does not assume what the end user needs so no environment variables gets send by default, which IMHO makes more sense.

Thanks!

Offline

Board footer

Powered by FluxBB