From 8601ab6b06ceb19bf07ebea47177ae1893faece8 Mon Sep 17 00:00:00 2001 From: Shane Smith Date: Mon, 4 Jul 2022 12:17:11 -0400 Subject: Silence setlocale warnings from `podman machine ssh` Connecting with `podman machine ssh` can results in the following warning: ``` /usr/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_CA.UTF-8) /usr/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_CA.UTF-8) /usr/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_CA.UTF-8) /usr/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_CA.UTF-8) ``` Best would probably be to remove `LC_ALL` (and other locale and lang env vars) from `/etc/ssh/sshd_config.d/50-redhat.conf` in the CoreOS image, but I'm not terribly sure how, so this is a quick alternative. [NO NEW TESTS NEEDED] Signed-off-by: Shane Smith --- pkg/machine/qemu/machine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index 2fe0230cf..7e9c786a9 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -1013,7 +1013,7 @@ func (v *MachineVM) SSH(_ string, opts machine.SSHOptions) error { port := strconv.Itoa(v.Port) args := []string{"-i", v.IdentityPath, "-p", port, sshDestination, "-o", "UserKnownHostsFile=/dev/null", - "-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR"} + "-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR", "-o", "SetEnv=LC_ALL="} if len(opts.Args) > 0 { args = append(args, opts.Args...) } else { -- cgit v1.2.3-54-g00ecf