[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Cannot ssh into a VM when using launching qemu with h

From: Narcis Garcia
Subject: Re: [Qemu-discuss] Cannot ssh into a VM when using launching qemu with hostfwd
Date: Fri, 31 Aug 2018 12:13:21 +0200

I use the complete syntax including listening address (localhost here):


El 30/08/18 a les 22:12, Kevin Wilson ha escrit:
> Hello,
> I am using qemu version 2.11.1 on Ubuntu 18.04
> I am trying to launch a VM and ssh into it without using tap devices
> and iptables.
> When I try to use "-redir" I get a message that it is deprecated.
> So I tried using the hostfwd option, according to the man page.
> This is how I launched qemu:
> /usr/bin/qemu-system-x86_64 -name us-vhost-vm1 \
> -cpu host -enable-kvm -m 2048 -object
> memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on
> -numa node,memdev=mem -mem-prealloc \
> -smp cores=2,sockets=1 -drive file=$vm_img,index=0,media=disk,format=$FORMAT \
> -netdev user,id=myid,hostfwd=tcp:10022-:22 -device
> rtl8139,netdev=myid,id=net0,mac=00:00:00:00:10:01
> The vm_img I am using is an Ubuntu 16.04 qcow2 image.
> The VM starts, and when I run ifconfig -a inside it I do eth0, which
> is an rtl8139 device (as ethtool -i eth0 shows).
> Also on the VM (guest), both the PermitRootLogin without-password
> and PermitRootLogin in /etc/ssh/sshd_config were set to yes, and I can
> ssh in the guest itself.
> But when I try to ssh from the host with "ssh localhost -p 10022",  I
> cannot connect, it simply hangs endlessly,  and does not prompt me
> for user.
> What can be the reason for that it does not work for me ?
> Regards,
> Kevin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]