diff options
author | Charlie Doern <cdoern@redhat.com> | 2022-08-23 11:04:54 -0400 |
---|---|---|
committer | cdoern <cbdoer23@g.holycross.edu> | 2022-09-26 18:35:01 -0400 |
commit | 2e4e1bb97cdd0fbef7ada673fa97f6b4989998eb (patch) | |
tree | de2e77c1852b505891c11d4cecfac5a1945abf0d /pkg/machine/qemu | |
parent | 5fc6d95a947bdf0e0bf013ee282c4a0f99b52a5a (diff) | |
download | podman-2e4e1bb97cdd0fbef7ada673fa97f6b4989998eb.tar.gz podman-2e4e1bb97cdd0fbef7ada673fa97f6b4989998eb.tar.bz2 podman-2e4e1bb97cdd0fbef7ada673fa97f6b4989998eb.zip |
podman machine ssh handling
add the key used in newly initialized machines to the user's known_hosts file. This ensures that golang will be able to ssh into the machine using
podman-remote. Also, remove the /dev/null redirection for podman machine ssh's known_hosts file.
resolves #15347
Signed-off-by: Charlie Doern <cdoern@redhat.com>
Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Diffstat (limited to 'pkg/machine/qemu')
-rw-r--r-- | pkg/machine/qemu/machine.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index fab25aa35..a6907c0df 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -405,6 +405,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) (bool, error) { WritePath: v.getIgnitionFile(), UID: v.UID, } + err = machine.NewIgnitionFile(ign) return err == nil, err } @@ -1033,7 +1034,7 @@ 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", + args := []string{"-i", v.IdentityPath, "-p", port, sshDestination, "-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR", "-o", "SetEnv=LC_ALL="} if len(opts.Args) > 0 { args = append(args, opts.Args...) |