How do I SSH into my virtual machine?

Sorry for the n00b question but I have been struggling and searching for a solution to this. I have successfully deployed VMs with 22.04 and 20.04 but I can’t crack the code on how to actually ssh into them. If someone could point me to a tutorial or just give me a nudge, I would really appreciate it.

I am running pretty much everything default in my config and I can Ping the VM. When I try to ssh into one that I have deployed either from my admin or my user account I get the standard prompt to add it to my known hosts (and it does get added) but I get rejected for a key error.

Do I need to do something with the cert that shows up in the UI or is there something else missing in my approach? I have added my ssh key from Launchpad when I logged in the first time in both accounts. This is LXD by the way.

Thanks.

When you deploy a machine with MAAS, SSH keys for the user that performed the deployment are automatically added to authorized_keys for the ubuntu user. Therefore you can ssh using any of the keys provided in the config.

Thanks for the reply. I figured it out. It wasn’t that I had the wrong (or missing) ssh key, I needed to user the userid “ubuntu” when I attempted to ssh in - not the ID of the MaaS user account.

2 Likes