Skip to content

Commit

Permalink
Fix machine ssh login failed in rootless mode
Browse files Browse the repository at this point in the history
add option to not read system ssh configurations
Fixes: containers#11731

Signed-off-by: pendulm <lonependulm@gmail.com>
  • Loading branch information
pendulm committed Sep 24, 2021
1 parent 800d594 commit d1fe291
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/machine/qemu/machine.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build (amd64 && !windows) || (arm64 && !windows)
// +build amd64,!windows arm64,!windows

package qemu
Expand Down Expand Up @@ -498,7 +499,7 @@ func (v *MachineVM) SSH(name 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, "-F", "none", sshDestination, "-o", "UserKnownHostsFile /dev/null", "-o", "StrictHostKeyChecking no"}
if len(opts.Args) > 0 {
args = append(args, opts.Args...)
} else {
Expand Down

0 comments on commit d1fe291

Please sign in to comment.