# VM loing SSH issue

**URL:** <https://forums.suse.com/t/vm-loing-ssh-issue/41018>\
**Category:** SUSE Virtualization\
**Created:** [July 3, 2023, 9:29am UTC](https://forums.suse.com/t/vm-loing-ssh-issue/41018 "2023-07-03T09:29:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harshadineth](https://avatars.discourse-cdn.com/v4/letter/h/dec6dc/32.png) [@harshadineth](https://forums.suse.com/u/harshadineth)\
**Post date:** [July 3, 2023, 9:29am UTC](https://forums.suse.com/t/vm-loing-ssh-issue/41018/1 "2023-07-03T09:29:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rrajendran17](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/rrajendran17/32/11570_2.png) [@rrajendran17](https://forums.suse.com/u/rrajendran17)\
**Post date:** [October 1, 2024, 10:07pm UTC](https://forums.suse.com/t/vm-loing-ssh-issue/41018/2 "2024-10-01T22:07:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [October 2, 2024, 5:25pm UTC](https://forums.suse.com/t/vm-loing-ssh-issue/41018/3 "2024-10-02T17:25:37Z")

</div>

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.
