mirror of
https://github.com/containers/podman.git
synced 2025-06-24 19:42:56 +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)
|
port := strconv.Itoa(sshPort)
|
||||||
|
|
||||||
args := []string{"-i", identityPath, "-p", port, sshDestination,
|
args := []string{"-i", identityPath, "-p", port, sshDestination,
|
||||||
|
"-o", "IdentitiesOnly=yes",
|
||||||
"-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR", "-o", "SetEnv=LC_ALL="}
|
"-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR", "-o", "SetEnv=LC_ALL="}
|
||||||
if len(inputArgs) > 0 {
|
if len(inputArgs) > 0 {
|
||||||
args = append(args, inputArgs...)
|
args = append(args, inputArgs...)
|
||||||
|
@ -16,6 +16,7 @@ func CommonSSH(username, identityPath, name string, sshPort int, inputArgs []str
|
|||||||
port := strconv.Itoa(sshPort)
|
port := strconv.Itoa(sshPort)
|
||||||
|
|
||||||
args := []string{"-i", identityPath, "-p", port, sshDestination,
|
args := []string{"-i", identityPath, "-p", port, sshDestination,
|
||||||
|
"-o", "IdentitiesOnly=yes",
|
||||||
"-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR", "-o", "SetEnv=LC_ALL="}
|
"-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR", "-o", "SetEnv=LC_ALL="}
|
||||||
if len(inputArgs) > 0 {
|
if len(inputArgs) > 0 {
|
||||||
args = append(args, inputArgs...)
|
args = append(args, inputArgs...)
|
||||||
|
@ -1492,7 +1492,10 @@ func (v *MachineVM) SSH(name string, opts machine.SSHOptions) error {
|
|||||||
sshDestination := username + "@localhost"
|
sshDestination := username + "@localhost"
|
||||||
port := strconv.Itoa(v.Port)
|
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 {
|
if len(opts.Args) > 0 {
|
||||||
args = append(args, opts.Args...)
|
args = append(args, opts.Args...)
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user