Skip to content

Commit

Permalink
Merge pull request #9417 from joshmue/fix_ssh_native_toggle
Browse files Browse the repository at this point in the history
Fix "--native-ssh" flag of "minikube ssh"
  • Loading branch information
sharifelgamal authored Oct 14, 2020
2 parents a03b01f + 8cfe5c1 commit 06a64de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ var sshCmd = &cobra.Command{
}

func init() {
sshCmd.Flags().Bool(nativeSSH, true, "Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'.")
sshCmd.Flags().BoolVar(&nativeSSHClient, "native-ssh", true, "Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'.")
sshCmd.Flags().StringVarP(&nodeName, "node", "n", "", "The node to ssh into. Defaults to the primary control plane.")
}
4 changes: 2 additions & 2 deletions pkg/minikube/machine/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ func CreateSSHShell(api libmachine.API, cc config.ClusterConfig, n config.Node,
return errors.Errorf("%q is not running", machineName)
}

client, err := host.CreateSSHClient()

if native {
ssh.SetDefaultClient(ssh.Native)
} else {
ssh.SetDefaultClient(ssh.External)
}

client, err := host.CreateSSHClient()

if err != nil {
return errors.Wrap(err, "Creating ssh client")
}
Expand Down

0 comments on commit 06a64de

Please sign in to comment.