SSH from local machine to virtual KVM guest

2

I have libvirt+lvm+kvm setup on dedicated server with one virtual guest inside. I can access guest from host using ssh and ip of guest, but I can't understand how do I access guest from my laptop using ssh. It seems to ssh to host and then it fails, because there is no such user (and this user exists only inside VM). Also, there is nginx installed on both host and vm and nginx proxies all requests for subdomain to vm's nginx (what is awesome and works as I expect).

So I need to somehow ssh from my local laptop to vm, bypassing vm host system.

Kirill Shirinkin

Posted 2013-06-17T21:45:58.883

Reputation: 23

Answers

0

seems to me that you need to set an iptables rule or something like this to tunnel connections from another port on the host (2222 for example) to the guest 22 port.

see: https://www.google.fr/search?q=libvirt+redirect+port

pataluc

Posted 2013-06-17T21:45:58.883

Reputation: 580