Multipass private key location (Windows)

So, I’ve been trying to get to the location of the private key used by Multipass whenever creating VMs under Windows (Hyper-V). Of course, I couldn’t find it anywhere on Google.

Of course, there’s is an option to pass your own public key, or even a hashed password, but let’s assume you don’t what to do that.

Also, whenever passing the password, you’ll also need to enable PasswordAuthentication, since it’s disabled by default.

Long story short, password can be found here:

C:\Windows\System32\config\systemprofile\AppData\Roaming\multipassd\ssh-keys

This can be copied to your home folder, in .ssh and used with the ssh command:

ssh -i .\id_rsa ubuntu@<multipass_hostname>.mshome.net

That’s because VMs created with Multipass will also get an entry to a local zone called mshome.net and managed by HyperV service.

How did I find it? Easy, just copy a part of the public key string, open Powershell as an administrator and run:

PS C:\> Get-ChildItem -Recurse | Select-String "<pub_key_string>" -List | Select Path

Leave a comment