From 4a834655118a83898a20b20663dfd048855fbf5f Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 30 May 2022 16:15:18 +0200 Subject: podman machine ssh: do not print warning everytime Currenlty this ssh warning is printed everytime: `Warning: Permanently added '[localhost]:33915' (ED25519) to the list of known hosts.` Since this is very anoying and makes it harder to capture the actual command output we should silence this. With log level error we will only see the important messages from ssh. Signed-off-by: Paul Holzinger --- pkg/machine/qemu/machine.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index e3fb3b970..eb650c91e 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -952,7 +952,8 @@ func (v *MachineVM) SSH(_ string, opts machine.SSHOptions) error { sshDestination := username + "@localhost" port := strconv.Itoa(v.Port) - args := []string{"-i", v.IdentityPath, "-p", port, sshDestination, "-o", "UserKnownHostsFile=/dev/null", "-o", "StrictHostKeyChecking=no"} + args := []string{"-i", v.IdentityPath, "-p", port, sshDestination, "-o", "UserKnownHostsFile=/dev/null", + "-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR"} if len(opts.Args) > 0 { args = append(args, opts.Args...) } else { -- cgit v1.2.3-54-g00ecf