VM loing SSH issue

Hi I am new to harvester and i need to login to a existing VM. I’ve added my ssh public key to the VM by editing the config and then restarted the VM. But I am not able to login to the VM. What could be the reason for this.

what is the user name you are using to login to the vm?
The user name depends on what vm image you are using.

If by “editing the config” you mean within Harvester then your VM won’t pick that up since cloud-init will have already run. You’ll need to add your SSH public key to the user account within the VM itself.