[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Cannot ssh a raspbian guest from the host
From: |
adarmon |
Subject: |
RE: Cannot ssh a raspbian guest from the host |
Date: |
Mon, 18 Nov 2019 18:43:40 +0200 |
Thanks Peter and Jeremy for your help but it still does not work.
According to the Peter's suggestion, this is the command I run:
sudo qemu-system-arm -no-reboot -curses -kernel
/home/ubuntu/qemu_vms/kernel-qemu-4.4.34-jessie -cpu arm1176 -m 256 -M
versatilepb -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw
console=ttyAMA0" -drive
"format=raw,file=/home/ubuntu/qemu_vms/shield.img,index=0,media=disk" -netdev
user,id=raspbi,hostfwd=tcp::8022-:22 -device e1000,netdev=raspbi
But in this case, only the loopback is defined in the Raspbian instance and ssh
localhost -p 8022 stll returns:
ssh_exchange_identification: read: Connection reset by peer
Thanks again
-----Original Message-----
From: Peter Maydell <address@hidden>
Sent: Monday, November 18, 2019 6:08 PM
To: address@hidden
Cc: qemu-discuss <address@hidden>
Subject: Re: Cannot ssh a raspbian guest from the host
On Sun, 17 Nov 2019 at 16:17, <address@hidden> wrote:
> This is the command I used to run the Raspbian instance:
>
> sudo qemu-system-arm -no-reboot -curses -kernel
> /home/ubuntu/qemu_vms/kernel-qemu-4.4.34-jessie -cpu arm1176 -m 256 -M
> versatilepb -serial stdio -append root=/dev/sda2 panic=1
> rootfstype=ext4 rw console=ttyAMA0 -drive
> format=raw,file=/home/ubuntu/qemu_vms/2017-03-02-raspbian-jessie.img,i
> ndex=0,media=disk -netdev
> user,id=shield,hostfwd=tcp:127.0.0.1:8022-:22 -net nic
This command line is mixing a new style "-netdev" network configuration option
with an old-style "-net" one. This probably won't work: you should either use
only new-style config options or only old-style config options.
New-style is either:
-netdev id=foo,... plus -device <some network device>,netdev=foo
or:
-nic ... (to set up an embedded network device that the board
pre-creates for you)
Old-style is:
-net nic -net user,... (the -net option is used both to say
"give me an emulated ethernet device" and also "use the 'user',
'tap', etc backends; you need to have two lots of -net, one
for each part of this.)
https://wiki.qemu.org/Documentation/Networking may be helpful, although it is a
bit sparse on how to do new-style network config with an embedded network
device model.
thanks
-- PMM