mirror of https://github.com/containers/podman.git
Fix known_hosts file clogging and remote host id
By enabling UserKnownHostsFile=/dev/null, and CheckHostIP=no options to the defaults we prevent the user from adding the host key multiple times and from flakes that can raise Remote Host Id change. Resolves: https://github.com/containers/podman/issues/23505 Signed-off-by: Nicola Sella <nsella@redhat.com>
This commit is contained in:
parent
6638337453
commit
6b1c7de3d5
|
|
@ -116,7 +116,10 @@ func commonNativeSSH(username, identityPath, name string, sshPort int, inputArgs
|
|||
|
||||
args := []string{"-i", identityPath, "-p", port, sshDestination,
|
||||
"-o", "IdentitiesOnly=yes",
|
||||
"-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR", "-o", "SetEnv=LC_ALL="}
|
||||
"-o", "StrictHostKeyChecking=no",
|
||||
"-o", "UserKnownHostsFile=" + os.DevNull,
|
||||
"-o", "CheckHostIP=no",
|
||||
"-o", "LogLevel=ERROR", "-o", "SetEnv=LC_ALL="}
|
||||
if len(inputArgs) > 0 {
|
||||
interactive = false
|
||||
args = append(args, inputArgs...)
|
||||
|
|
|
|||
Loading…
Reference in New Issue