I am trying to setup passwordless ssh to my localhost (itself).
I have host machine PM1 and then I lauch a VM(vm1) using qemu-kvm and logged into VM. Then, I am trying to setup passworless ssh within vm1, so that ssh root@vm1 (from vm1 itself) should log me in without password.
vm1# ssh-copy-id root@vm1
vm1# ssh root@vm1
Now, I can login without password. no issues.
Then I started looking into authorized_keys. /root/.ssh/authorized_keys
Here I find a new entry like:
ssh-rsa <some key> <hostmachine username>@<hostmachine hostname>
how come hostmachine username and hostmachine hostname comes into picture here?? Should n't it be vm machine username @ vm machine hostname?
This looks bit weird.