mirror of https://github.com/containers/podman.git
fix(ssh): start machine failed to start with exit status 255
Signed-off-by: Black-Hole1 <bh@bugs.cc>
This commit is contained in:
parent
0ada57fbb2
commit
c2360800e0
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue