ssh into local virtual machine

Hi

I have an appliance called my_appliance.raw

To start the appliance locally, I use:

qemu-kvm my_appliance.raw

After that I would like to ssh into the guest from the host but just the ssh command doesn’t work.

firewall is disabled on guest. the ip I use is the one that ifconfig shows when I run it on guest. sshd is running

I am not really sure as to where to look next.

Thank you,
Cristian

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Are your packets even getting to the guest? Can the guest SSH to the
host? Your routing/netmask could be set in a way that prevents this, or
your VM environment could be explicitly preventing it. Does ping work?
Does netcat work?

netcat -zv ipAddressHere 22
ping -c 2 ipAddressHere

Post the output to those here, please.

Good luck.

On 07/18/2011 06:36 AM, cmessel wrote:
>
> Hi
>
> I have an appliance called my_appliance.raw
>
> To start the appliance locally, I use:
>
> Code: -------------------- qemu-kvm my_appliance.raw
> --------------------
>
>
> After that I would like to ssh into the guest from the host but just
> the ssh command doesn’t work.
>
> firewall is disabled on guest. the ip I use is the one that ifconfig
> shows when I run it on guest. sshd is running
>
> I am not really sure as to where to look next.
>
> Thank you, Cristian
>
>


Want to yell at me in person?
Come to BrainShare 2011 in October: http://tinyurl.com/brainshare2011
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOJG+fAAoJEF+XTK08PnB5H1MP/2lVK5zblW1FPu5TxmaZgTO2
VF2GIrMVWlUjTUSj204kG1GiettqcsCa3Uc5oqSY5rbKLFE3PGvA61MIQMV8afzs
tcV9YQJYdfImDMYXlTxJ9ejmJJ6Ic8h47Gi6YQfnhzT2RoS69oxNfp7kcT4xuXuL
aHMXh34sR+Cl2H3llX9hj/Z2s8QZMvtOEPGIBypku0RC3fSJasz84SxRBv8CD7+l
zW8Q5auC11+xBrSR9v64T9iJly9ZzPGuIJM9v9T3f/V7bciUGsp015jEXzmo20sp
PUJL3IgMbkHtPUWFyuz64Ysr3IS0KtxqtrMk4SheBLeZ246geiabPXPLiKe7gF5p
yu5aim56q/jD9feRXqyQD54CHHzQi7nPKIhma2YbGK+OKoM0cc2Wx6WXaqyQD9U9
I6hau0MaUslYzlngdkYLl6uc6XCBP2YTjzo7h/eWzz/1/M0AtQalmpWhMAJOAKil
jQmYLohDA/sxLJuJxuv5Nb4Ld/qb8Jm+9yvCF8QbPkaf7s4vwQI1zNpSBpPbpJA/
bLEbkbrg1CUvCbByu8DcD6m/MGQ8wEPDNPuJPeoM32ZZqdu0swyx4pXQGAP5KvTM
zghiTNhKLnGy8jE9a332wC5Dg3TbjoH4EmvY5qFLJ4AwHl+2W4Mboy/BEYTW56RG
rMcb6wOvcNJqbK0exEIq
=wIvp
-----END PGP SIGNATURE-----

I believe you have to be using bridged networking to be able to access network services like ssh on a vm

Usually the networking adapter gets set up as nat so you could try changing it to bridged and see if that works