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=-0.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 F041CC43381 for ; Tue, 12 Mar 2019 14:03:33 +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 B28F42087C for ; Tue, 12 Mar 2019 14:03:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="upitj2pd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B28F42087C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 1h3hzx-0000f5-Nm; Tue, 12 Mar 2019 10:03:17 -0400 Received: from mail-ua1-x936.google.com ([2607:f8b0:4864:20::936]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1h3hzv-0000es-U7 for kernelnewbies@kernelnewbies.org; Tue, 12 Mar 2019 10:03:15 -0400 Received: by mail-ua1-x936.google.com with SMTP id r21so803779uan.11 for ; Tue, 12 Mar 2019 07:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KvaI0VCBVCzTg+3CN9M2PU/lJ1a9ZkyRLn/CJ2kOuIk=; b=upitj2pdA9z4IducWBk84T+ll0TxWaillRih4wY/PCZEefKdSb5ILHNiIyZfLoVNv9 WE+AUu1HBag1IbBeavJSV0p1D0PdHdo7SDTio4UyxYAil/x1zmydzxQUqGAAv0njx8GK 9HS0Nn8h+A9WGMfpqmeJQjFIRcEAfbv5cTHZlhhbTlp/H+n7bUzvEj3gS+P2q0PB56FX orajZ5X3WfFXk4Iyxa4ZzJXOZxe8rpzFbrnGj8nEYpY6WBvzccFEYNE45yflVpcrt+SZ FCV16YQNdqI7eSjGT/TkSxI1l5dN1MLLRG768t5Ex8jh3D8zd8+fut7oa2nh9lIwEPiM Mk4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KvaI0VCBVCzTg+3CN9M2PU/lJ1a9ZkyRLn/CJ2kOuIk=; b=QjEP5H8nHXyOncBQKiyIzGIf6LJcihq2mgDm5M9jiPdADwjz1ZwXfGnpn8h6dd+OKD klqcm5v6/BRuwnXLkNYbl9BksmUs6MFb0ZfP5BcCXsSaZ1kF9zRZPr1T9Nyc4R/ID5Qz mCKEZJuWRA7pKxK/u/jaUwr7xRwMD6dIi/2sBvrmpHaZ2g5X89jjN+0+yZ19/MidUsSH 9v/xLRSbvH6M2JpVCNYENbDCuoxP2Vr4FKb6OrH24QLT+VfE/m4fBZIW7sqVqoLiCAQ2 Y4S/aZQK9OribCpmmV3eoLI59iGFksi2LqAkPJoLq3SrH01rMC75SXxK3qz0+sE7YP14 oJrg== X-Gm-Message-State: APjAAAVuuAm0nMX8phlvZYit5HmB5bhfudSxVj0L0XGnVkZ134TXVu9R SzUXpxxhAxqCe2CL+bji0OJRidVHceNbBj4J8Yo= X-Google-Smtp-Source: APXvYqy6XhBwtFoMwZq0HDm9m4Uzw7JNBFdW4J1FiaBosJaBZmncW9aniaEAZwiIHokYb4uR5LhqZvLUw31QuYiTuns= X-Received: by 2002:ab0:7483:: with SMTP id n3mr19892981uap.131.1552399389065; Tue, 12 Mar 2019 07:03:09 -0700 (PDT) MIME-Version: 1.0 References: <2c5d240eabdb56913f4abcc9aacf2b6b@mailhost.ics.forth.gr> In-Reply-To: <2c5d240eabdb56913f4abcc9aacf2b6b@mailhost.ics.forth.gr> From: Pintu Agarwal Date: Tue, 12 Mar 2019 19:32:57 +0530 Message-ID: Subject: Re: ssh session with qemu-arm using busybox To: Nick Kossifidis Cc: qemu-devel@nongnu.org, linux-riscv@lists.infradead.org, open list , 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org > > -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 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@localhost: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 _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies