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 <pholzing@redhat.com>
This commit is contained in:
parent
0e58636c3a
commit
4a83465511
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue