163

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

soupybionics
  • 4,200
  • 6
  • 31
  • 43

10 Answers10

256

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

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
bfallik
  • 2,825
  • 1
  • 11
  • 9
92

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

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Mukarram Syed
  • 1,059
  • 6
  • 4
  • I showed the vn from virtualbox and as above I used user: docker pasword: tcuser – AbelSurace Sep 12 '19 at 21:21
  • 2
    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 https://stackoverflow.com/a/42913652/1901067 answer from @Bob Van Zant – David Oct 25 '20 at 09:42
55

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)
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Bob Van Zant
  • 2,101
  • 1
  • 14
  • 6
26

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.

Duane
  • 4,572
  • 6
  • 32
  • 33
20
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 docker@127.0.0.1 -o IdentitiesOnly=yes -i ~/.minikube/machines/minikube/id_rsa -p 56290
weivall
  • 917
  • 13
  • 16
  • 1
    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`. – Sridhar Sarnobat Oct 26 '18 at 23:49
7

All the files mentioned are AuthOptions, which can be configured in the config.json file:

$HOME\.minikube\machines\minikube\config.json

Generally, the SSH user is: docker.

If you want to ssh into your Minikube node/VM, then use SSH keys. You can use a Windows client application like WinSCP to configure the keys for your VM. If the format of keys is not as expected (.ppk), then use another client called PuttyGen to convert the keys into the expected format.

After you're done, log in using WinSCP, and it will enable you to shh into the desired VM using the configured keys.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Aprimit
  • 171
  • 2
  • 5
7

Getting user and password for minikube in Mac.

cat ~/.minikube/machines/minikube/config.json

Loggin on SSH

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

Rub21
  • 647
  • 7
  • 5
7

docker/tcuser is the username/password to access to it , and it's also an straight way.

if you just want to master the control platform, then minikube ssh is a quick way to login.

imissyou
  • 123
  • 2
  • 5
4

Give User Name as - docker enter image description here

Give password as tcuser and press enter :

enter image description here

O_K
  • 922
  • 9
  • 14
0
minikube ssh -v 7

works for me. This will get to in the ssh docker minikube

minikube ssh docker@{IP Address}

doesn't work for me.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 09 '22 at 11:01