mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
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 <shane.smith@shopify.com>
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user