multipass
multipass copied to clipboard
Add integration with SSH
What are you trying to do? A description of what you want to happen. I want to use VScode SSH to VM, but seemingly I can only use “multipass shell vm-name" to interact with an instance
Hi @zeminzhou, you can use --cloud-init <file>
to populate the authorized keys, like so:
ssh_authorized_keys:
- <your key>
Then, if using Hyper-V, you can use <instance-name>.mshome.net
as the host you're trying to connect to. If using VirtualBox, you'll need to forward the SSH port from the instance, or use the new --network
feature to have direct networking between your host and the instance.
We plan to improve this by populating your ssh config with instances so they're always in sync.
Think your answer
We plan to improve this by populating your ssh config with instances so they're always in sync.
I think this would be very useful.
The only thing left is to manually copy or link private key from internal multipass store as explained here: https://github.com/canonical/multipass/issues/913