From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3673C43381 for ; Wed, 13 Mar 2019 20:39:36 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 77841213A2 for ; Wed, 13 Mar 2019 20:39:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77841213A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1h4AeU-0008Qo-Hh; Wed, 13 Mar 2019 16:39:02 -0400 Received: from foss.arm.com ([217.140.101.70]) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1h3i8F-0000xQ-Sz for kernelnewbies@kernelnewbies.org; Tue, 12 Mar 2019 10:11:52 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E27A4165C; Tue, 12 Mar 2019 07:11:44 -0700 (PDT) Received: from [10.1.196.93] (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 93FBB3F71D; Tue, 12 Mar 2019 07:11:43 -0700 (PDT) Subject: Re: ssh session with qemu-arm using busybox To: pintu.ping@gmail.com, mick@ics.forth.gr References: <2c5d240eabdb56913f4abcc9aacf2b6b@mailhost.ics.forth.gr> From: Suzuki K Poulose Message-ID: <00078ed3-fe1d-722e-0943-80bb189ee3ab@arm.com> Date: Tue, 12 Mar 2019 14:11:41 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mailman-Approved-At: Wed, 13 Mar 2019 16:38:56 -0400 Cc: qemu-devel@nongnu.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kernelnewbies-bounces@kernelnewbies.org 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 > > NET: Registered protocol family 17 > > 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