canonical / canonical/multipass
Can no longer connect to any existing multipass VMs due to invalid publickey
- Dominant language
- C++
- Stars
- 9.2k
- Forks
- 828
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 44
Description
**Describe the bug**
I created several VMs in multipass 0-8 days ago. Earlier today, I could connect to all of them, but today, after disconnecting from one, I can now no longer connect to any of them. New VMs are connectable.
All pre-existing VMs now all report an invalid publickey when I try to connect to them.
```
PS C:\Users\michael> multipass list
Name State IPv4 Image
primary Stopped -- Ubuntu 22.04 LTS
precious-cow Deleted -- Not Available
refreshed-kookaburra Deleted -- Not Available
relative-whistler Deleted -- Not Available
sensitive-sandpiper Stopped -- Ubuntu 22.04 LTS
sound-lungfish Running 172.17.7.112 Ubuntu 22.04 LTS
PS C:\Users\michael> multipass shell sound-lungfish
shell failed: ssh failed to authenticate: 'Access denied for 'publickey'. Authentication that can continue: publickey'
```
but here are the results for a new VM:
```
PS C:\Users\michael> multipass launch
Launched: receiving-gadwall
Skipping mount due to disabled mounts feature
PS C:\Users\michael> multipass shell receiving-gadwall
Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-57-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Wed Jan 18 12:30:02 CST 2023
System load: 0.08740234375 Processes: 91
Usage of /: 30.2% of 4.67GB Users logged in: 0
Memory usage: 25% IPv4 address for eth0: 172.17.5.223
Swap usage: 0%
0 updates can be applied immediately.
```
**To Reproduce**
How, and what happened?
1. `multipass launch` some number of times
2. (this part is unclear to me) interact with VMs for 0-8 days while rebooting, powering off, etc. a variable number of times with both the VMs and the physical host
3. continue to successfully connect to VMs
4. don't do anything; simply close shell to one of the VMs
5. try to run `multipass shell ` on a running VM
6. fail to connect, get the error above
**Expected behavior**
I expect the publickey to remain valid, and to successfully open a shell to the VM.
**Logs**
[Multipass.txt](https://github.com/canonical/multipass/files/10449546/Multipass.txt)
**Additional info**
OS: Windows 11 Pro 21H2, build 22000.1455
```
PS C:\Users\michael> multipass version
multipass 1.10.1+win
multipassd 1.10.1+win
PS C:\Users\michael> multipass info --all
info failed: ssh failed to authenticate: 'Access denied for 'publickey'. Authentication that can continue: publickey'
PS C:\Users\michael> multipass get local.driver
hyperv
```
**Additional context**
I am running multipass on Windows.
I have not changed how my ssh keys are configured for any of my VMs, so they should all continue using the keys created by multipass.
Contributor guide
Research direction
Start with the attached Multipass.txt log and reproduce the failure on Windows 11 with Multipass 1.10.1 using the Hyper-V driver. Compare shell access for existing and newly launched VMs, including the reported `multipass shell` and `multipass info --all` failures. Done means existing VMs remain accessible after disconnecting, rebooting, or powering off, while new VMs continue to work.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100