mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Merge pull request #18915 from BlackHole1/fix-start-machine-255
fix(ssh): machine failed to start with exit status 255
This commit is contained in:
@ -573,6 +573,7 @@ func AppleHVSSH(username, identityPath, name string, sshPort int, inputArgs []st
|
||||
port := strconv.Itoa(sshPort)
|
||||
|
||||
args := []string{"-i", identityPath, "-p", port, sshDestination,
|
||||
"-o", "IdentitiesOnly=yes",
|
||||
"-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR", "-o", "SetEnv=LC_ALL="}
|
||||
if len(inputArgs) > 0 {
|
||||
args = append(args, inputArgs...)
|
||||
|
@ -16,6 +16,7 @@ func CommonSSH(username, identityPath, name string, sshPort int, inputArgs []str
|
||||
port := strconv.Itoa(sshPort)
|
||||
|
||||
args := []string{"-i", identityPath, "-p", port, sshDestination,
|
||||
"-o", "IdentitiesOnly=yes",
|
||||
"-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR", "-o", "SetEnv=LC_ALL="}
|
||||
if len(inputArgs) > 0 {
|
||||
args = append(args, inputArgs...)
|
||||
|
@ -1492,7 +1492,10 @@ 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, sshDestination,
|
||||
"-o", "IdentitiesOnly yes",
|
||||
"-o", "UserKnownHostsFile /dev/null",
|
||||
"-o", "StrictHostKeyChecking no"}
|
||||
if len(opts.Args) > 0 {
|
||||
args = append(args, opts.Args...)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user