lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOuPNLg4dfoovZ_eqL5XvNW3Ak9dGeCVr=vbG6G5t4Rxo-nC9Q@mail.gmail.com>
Date:   Tue, 12 Mar 2019 19:32:57 +0530
From:   Pintu Agarwal <pintu.ping@...il.com>
To:     Nick Kossifidis <mick@....forth.gr>
Cc:     open list <linux-kernel@...r.kernel.org>,
        kernelnewbies@...nelnewbies.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-riscv@...ts.infradead.org, qemu-devel@...gnu.org
Subject: Re: ssh session with qemu-arm using busybox

>
> -netdev user,id=unet,hostfwd=tcp::2222-:22 \
> -net user \
>
> and you 'll get guest's port 22 to be forwarded to hosts port 2222, so
> you can do
>
> ssh root@...alhost:2222
>
> from the host.
>

I tried many different options, but unfortunately none worked for me.
1)
qemu-system-arm -M vexpress-a9 -m 1024M -kernel
../KERNEL/linux/arch/arm/boot/zImage -dtb
../KERNEL/linux/arch/arm/boot/dts/vexpress-v2p-ca9.dtb -initrd
rootfs.img.gz -append "console=ttyAMA0 root=/dev/ram rdinit=/sbin/init
ip=dhcp" -nographic -smp 4 -netdev user,id=unet,hostfwd=tcp::2222-:22
-net user

With this the eth0 interface is removed, and I see this message
(although login works):
qemu-system-arm: warning: hub 0 with no nics
qemu-system-arm: warning: netdev unet has no peer
Booting Linux on physical CPU 0x0
<skip>
NET: Registered protocol family 17
<skip>
Run /sbin/init as init process
ifconfig: SIOCSIFADDR: No such device
route: SIOCADDRT: Network is unreachable

But, ssh is still not working.
ssh root@...alhost:2222
ssh: Could not resolve hostname localhost:2222: Name or service not known


2) if I give "-net nic" I get eth0 interface but still ssh does not work.
qemu-system-arm: warning: netdev unet has no peer
Booting Linux on physical CPU 0x0

3) With this there is no error, but still ssh not working
qemu-system-arm -M vexpress-a9 -m 1024M -kernel
../KERNEL/linux/arch/arm/boot/zImage -dtb
../KERNEL/linux/arch/arm/boot/dts/vexpress-v2p-ca9.dtb -initrd
rootfs.img.gz -append "console=ttyAMA0 root=/dev/ram
rdinit=/sbin/init" -nographic -netdev
user,id=net0,hostfwd=tcp::2222-:22 -device
virtio-net-device,netdev=net0 -net user -net nic

ssh root@...alhost:2222
ssh: Could not resolve hostname localhost:2222: Name or service not known

4) I also followed the steps mentioned in the below document, but its
same result:
https://wiki.qemu.org/Documentation/Networking

-------------
So, I have some doubts:
- Do, I need anything to be configured on host PC as well ?
  I am using Ubuntu 16.04 desktop, and it is connected to only one
office LAN network
- Do I need any network configuration changes on host ?
- Do I need to enable any thing in kernel side ?
- I am using minimal busybox and I see there is no "ssh" command
there. Do I need a different busybox or a dropbear ?
- Will it work easily with buildroot ?
- Is there any precompiled arm32-rootfs image present somewhere, which
which ssh can work by default ?
  Because, I really don't care much about user side, so any arm-rootfs
should be fine for me
- I haven't really explored "bridge/tap" network yet. Is that worth to
try in these conditions.


Regards,
Pintu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ