How do I ssh into the VM for Minikube?

92,081

Solution 1

You can use the Minikube binary for this, minikube ssh.

Solution 2

Minikube uses boot2docker as its base image, so the default SSH login to the VM ends up being docker:tcuser1.

Solution 3

I too wanted to login without the Minikube command. I found that it drops the SSH key it generates into ~/.minikube/machines//id_rsa.

My machine was named the default "minikube", and therefore I could do:

ssh -i ~/.minikube/machines/minikube/id_rsa docker@$(minikube ip)

Solution 4

For windows hyper-v the answer was

  • open "Hyper-V Manager"

  • right click on the "minikube" VM

  • user "root"

There was no password.. that got me in.

Solution 5

minikube ssh -v 7

It will show you the output where you can see the full SSH command

/usr/bin/ssh -F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none [email protected] -o IdentitiesOnly=yes -i ~/.minikube/machines/minikube/id_rsa -p 56290
Share:
92,081
soupybionics
Author by

soupybionics

Updated on July 08, 2022

Comments

  • soupybionics
    soupybionics almost 2 years

    What is the username/password/keys to ssh into the Minikube VM?

  • Sridhar Sarnobat
    Sridhar Sarnobat over 5 years
    For anyone confused - that will take you into the VM for the entire cluster (the "master"?). From there, you can docker exec -it bash one of the containers listed in docker ps.
  • Andrew Price
    Andrew Price about 5 years
    Nice! ssh -i ~/.minikube/machines/minikube/id_rsa docker@$(minikube ip) worked in gitbash on windows too :)
  • AbelSurace
    AbelSurace over 4 years
    I showed the vn from virtualbox and as above I used user: docker pasword: tcuser
  • Tonmoy
    Tonmoy over 4 years
    Nice work @Rub21. Your answer helped me when I needed to SSH into minikube on Mac
  • David
    David over 3 years
    It is deprecated now, and password login is disabled. Login is now available by private public key only, like here: ssh -i ~/.minikube/machines/minikube/id_rsa docker@$(minikube ip) described in stackoverflow.com/a/42913652/1901067 answer from @Bob Van Zant
  • NIK
    NIK over 2 years
    This worked... Thanks (My environment was Fedora + VirtualBox)