Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Provisioning VM: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain #2904

Closed
chrisalex2 opened this issue Jun 14, 2018 · 16 comments
Labels
area/networking networking issues co/hyperv HyperV related issues co/sshd ssh related issues ev/ssh-auth kind/bug Categorizes issue or PR as related to a bug. os/windows

Comments

@chrisalex2
Copy link

Environment:

Minikube version: v0.28.0

  • OS : Windows 10
  • VM Driver: hyperv

What happened: Starting minikube with v0.28.0 throws the following error:

E0614 17:09:30.577303 1732 start.go:174] Error starting host: Error creating host: Error executing step: Provisioning VM.
: Temporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [publickey none], no supported methods remain
Temporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

What you expected to happen: minikube to start correctly

How to reproduce it (as minimally and precisely as possible):
minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch" --cpus 3 --memory 4096

Output of minikube logs (if applicable):
F0614 17:18:44.984795 16020 logs.go:50] Error getting cluster bootstrapper: getting kubeadm bootstrapper: getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Anything else do we need to know:

I have tried the latest version on two different computers running different versions of Windows 10 and both get the same issue. If I downgrade to v0.27.0 then it starts up fine.

@ch-abrandt
Copy link

ch-abrandt commented Jun 14, 2018

I'm having the same exact issue on OSX 10.13.5

Same log entry:
F0614 10:19:33.601098 44519 logs.go:50] Error getting cluster bootstrapper: getting kubeadm bootstrapper: getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

And then once it's done hanging, it gives this error and retries:
E0614 10:21:28.061729 44295 start.go:168] Error starting host: Temporary Error: Error configuring auth on host: OS type not recognized.

@ch-abrandt
Copy link

My issue was fixed by upgrading to the latest version of Virtual Box and removing ~/.minikube, then running minikube start.

@yokodev
Copy link

yokodev commented Jun 15, 2018

Ubuntu 16.04 here, same issue... had to:

1. Upgrade VBox
2. Delete minikube VM
3. Delete ~/.minikube

@Arnavion
Copy link

I placed the path of a native ssh binary in PATH (ssh.exe of git bash) so that minikube uses that instead of its "native Go" SSH implementation, and I have no problems. Something must be busted with the native Go implementation.

@F21
Copy link

F21 commented Jun 21, 2018

Same issue as @chrisalex2 on Windows 10 64-bit (April Update with latest update).

$ minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
E0621 09:58:11.754507    8344 start.go:168] Error starting host: Error creating host: Error executing step: Provisioning VM.
: Temporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remainTemporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Temporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Temporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [publickey none], no supported methods remain
Temporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain.

 Retrying.
E0621 09:58:11.761506    8344 start.go:174] Error starting host:  Error creating host: Error executing step: Provisioning VM.
: Temporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remainTemporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Temporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Temporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [publickey none], no supported methods remain
Temporary Error: provisioning: error getting ssh client: Error dialing tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
================================================================================
An error has occurred. Would you like to opt in to sending anonymized crash
information to minikube to help prevent future errors?
To opt out of these messages, run the command:
        minikube config set WantReportErrorPrompt false
================================================================================

Problem persists after deleting .minikube and starting from scratch.

@shays10
Copy link

shays10 commented Jun 21, 2018

Same issue here. Deleting .minikube didn't help.

I had to run docker-machine ls and then docker-machine rm <your machine name>
Only then minikube start worked properly without crashing on the ssh error

@srflaxu40
Copy link

srflaxu40 commented Jun 29, 2018

Yep, same here. Workaround? Can I at least use an older version?

Get lots of ssh handshake errors in spite of openssh being installed. Setup hyperv with the primary network switch as rec'ed in the install documentation.

This is the command I run:

minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch" --kubernetes-version=v1.8.0 --extra-config=apiserver.Authorization.Mode=RBAC --memory=4096 --cpus=4 --v=7

Never runs.

@F21
Copy link

F21 commented Jun 29, 2018

@srflaxu40 I downgraded to 0.27.0 to get it working in the meantime.

@ShiningRush
Copy link

@F21 It works for my on win10.

@ducminhn
Copy link

Yep, downgrade to 0.27 works for me as well.

@stefanjarina
Copy link

I can also confirm. Had the same error with ssh handshake on
Windows 10 Pro 1803 (OS build 17134.228) with Hyper-V

Command used:
minikube start --vm-driver="hyperv" --memory=4096 --cpus=4 --hyperv-virtual-switch="External" --v=7 --alsologtostderr
Initial version: 0.28.2
Tried the following (removed .minikube and .kube between the steps):

remove optional windows openssh -> didn't work
install openssh via chocolate -> didn't work
Downgrading to version 0.27 using the built in ssh go iplmenetation -> didn't work
Downgrading to 0.27 using the optional windows openssh -> didn't work
Downgrading to 0.27 using the OpenSSH 7.7.2.1 from chocolatey --> THIS WORKED!

Seems like there is serious bug in 0.28 version.

@m1o1
Copy link

m1o1 commented Sep 1, 2018

I found that I can start minikube with 0.28.2 but I need to tinker with various settings and try a couple of times to get it working.

  • I need to run it from the same drive as my user profile (C:)
  • I found that if I set the memory to 4096, it fails more often than if I set it to something lower
  • When I start it, I keep an eye on the VM from the hyperv manager, and if I ever see the memory jump from what I set it to (like 4096) to something lower (like 796), I can confidently say it will fail so I stop it, delete it, and try again. Sometimes it works the next time. Closing programs seems to help (even though I'm nowhere near max RAM usage)
  • If I move networks (switching from Wi-Fi to Ethernet for example), my connection to the cluster breaks - so I need to delete and recreate my cluster whenever I switch (or my comp goes to sleep) - this is less relevant for starting, but I get the ssh handshake fail on an existing cluster when this happens

@tstromberg tstromberg changed the title Minikube v0.28 not starting Error executing step: Provisioning VM: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain Sep 19, 2018
@tstromberg tstromberg added os/windows co/hyperv HyperV related issues area/networking networking issues failed/local-networking startup failures due to networking issues kind/bug Categorizes issue or PR as related to a bug. labels Sep 19, 2018
@tstromberg tstromberg changed the title Error executing step: Provisioning VM: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain Error Provisioning VM: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain Sep 19, 2018
@tstromberg tstromberg added co/sshd ssh related issues ev/ssh-auth and removed failed/local-networking startup failures due to networking issues labels Sep 20, 2018
@tstromberg
Copy link
Contributor

Closing as dupe of #2776 - this seems to be an ssh authentication issue rather than a networking issue.

@davidovich mentioned to me that he suspects a data race in https://github.com/docker/machine/blob/6c90ba4d3da9a37ebc15c4c65d61479db075fca5/libmachine/ssh/keys.go#L57 - which apparently does not close files properly.

@ChabaOk
Copy link

ChabaOk commented Oct 2, 2018

In Hyper-V on Windows Server 2016,
I run this command > minikube start --vm-driver hyperv --hyperv-virtual-switch "VirtualSwitch-External"
And get this error.

Error dialing TCP: ssh: handshake failed: ssh: unable to authenticate, attempted methods [publickey none], no supported methods remain

From recommendation in above, I found my version is 0.30 and I have rolled back to 0.27. The problem has resolved.

@davidovich
Copy link
Contributor

please see #3195 as this is likely the problem fix.

@jeetwide
Copy link

jeetwide commented Oct 4, 2019

I can also confirm. Had the same error with ssh handshake on
Windows 10 Pro 1803 (OS build 17134.228) with Hyper-V

Command used:
minikube start --vm-driver="hyperv" --memory=4096 --cpus=4 --hyperv-virtual-switch="External" --v=7 --alsologtostderr
Initial version: 0.28.2
Tried the following (removed .minikube and .kube between the steps):

remove optional windows openssh -> didn't work
install openssh via chocolate -> didn't work
Downgrading to version 0.27 using the built in ssh go iplmenetation -> didn't work
Downgrading to 0.27 using the optional windows openssh -> didn't work
Downgrading to 0.27 using the OpenSSH 7.7.2.1 from chocolatey --> THIS WORKED!

Seems like there is serious bug in 0.28 version.

Hi. Can you please help me how do I downgrade it,.

Basically I need to do RnD on kubernetes and docker at local Windows 10 pro PC, so I am installing docker and kubernetes with hyper-v. With VirtualBox kubernetes is working fine but I unable to work on docker in that case.

I have done following things

choco uninstall minikube
choco install minikube --version 0.27.0 --allow-downgrade

After these & deleting .minikube & .kube directory, when I enter minikube version it still says
minikube version: v0.28.2

Any help will be highly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking networking issues co/hyperv HyperV related issues co/sshd ssh related issues ev/ssh-auth kind/bug Categorizes issue or PR as related to a bug. os/windows
Projects
None yet
Development

No branches or pull requests