kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: pintu.ping@gmail.com, mick@ics.forth.gr
Cc: qemu-devel@nongnu.org, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	kernelnewbies@kernelnewbies.org
Subject: Re: ssh session with qemu-arm using busybox
Date: Tue, 12 Mar 2019 14:11:41 +0000	[thread overview]
Message-ID: <00078ed3-fe1d-722e-0943-80bb189ee3ab@arm.com> (raw)
In-Reply-To: <CAOuPNLg4dfoovZ_eqL5XvNW3Ak9dGeCVr=vbG6G5t4Rxo-nC9Q@mail.gmail.com>



On 12/03/2019 14:02, Pintu Agarwal wrote:
>>
>> -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@localhost: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@localhost:2222
> ssh: Could not resolve hostname localhost:2222: Name or service not known

man ssh

+

Make sure you have sshd in your custom rootfs and has been stared.

Cheers
Suzuki

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2019-03-13 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 14:34 ssh session with qemu-arm using busybox Pintu Agarwal
2019-03-11 18:28 ` Nick Kossifidis
2019-03-12 14:02   ` Pintu Agarwal
2019-03-12 14:11     ` Suzuki K Poulose [this message]
2019-03-12 17:08       ` Pintu Agarwal
2019-03-12 23:12         ` [Qemu-devel] " Dongli Zhang
2019-03-11 19:33 ` BALATON Zoltan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00078ed3-fe1d-722e-0943-80bb189ee3ab@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mick@ics.forth.gr \
    --cc=pintu.ping@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).