Re: [yocto] Cannot ssh into qemu guest
On 09.03.24 19:58, Xylopyrographer via lists.yoctoproject.org wrote: > Thanks for the reply. > > Still a bit green with all this but from the QEMU VM, *sshd* is running > and port 22 is open. > > Checked by running: > *ps aux | grep sshd > *and > *netstat -plant | grep :22 > > *as well, I can telnet in to the VM itself by running (from within the VM): > * > telnet localhost 22* > > which returns: > *Connected to localhost* > *SSH-2.0-OpenSSH_9.5* > > So I think all is as it should be on the QEMU side of things? If you pass the option `slirp` to runqemu, it forwards the ssh port to to the outside. Check with `ss -tlp`. [1]: https://docs.yoctoproject.org/dev/dev-manual/qemu.html#runqemu-command-line-options Kind regards Jörg Sommer -- Navimatix GmbH Tatzendpromenade 2 D-07745 Jena Geschäftsführer: Steffen Späthe, Jan Rommeley Registergericht: Amtsgericht Jena, HRB 501480 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62741): https://lists.yoctoproject.org/g/yocto/message/62741 Mute This Topic: https://lists.yoctoproject.org/mt/104819558/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] Cannot ssh into qemu guest
I'd suggest that in the serial console you get: 1) check the ip address of the booted target 2) Run 'ssh root@localhost' on that target to check if login onto itself is OK 3) If you can ssh locally and the ip is 192.168.7.2, and you still have problem with 'ssh root@192.168.7.2', maybe you need to check the iptables rules of your host. Is it reachable? 'ping 192.168.7.2'? Regards, Qi On 3/9/24 06:58, Xylopyrographer wrote: I've built a QEMU quemuarm64 core-image-full-cmdline machine. Runs fine. I'm launching it with: *runqemu qemuarm64 nographic* Now trying to figure out how to ssh into it. The book I'm following simply states: "You can SSH into this VM with *ssh root@192.168.7.2*" A bit later, going through the exercise of using devtool to add a new recipe, the command line is: *devtool deploy-target bubblewrap root@192.168.7.2* However, both *ssh root@192.168.7.2* and the *deploy-target* commands time out on attempting the ssh connection. * Host is Debian 12 Bookworm * Yocto version is nanbield * Using GNOME Terminal * Launching qemu in one Terminal window, running everything else in a second Terminal window. Any pointers on the magic incantation to get this running? Many thanks. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62722): https://lists.yoctoproject.org/g/yocto/message/62722 Mute This Topic: https://lists.yoctoproject.org/mt/104819558/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] Cannot ssh into qemu guest
See if you have debug-tweaks in IMAGE_FEATURES you can easily check it with bitbake-getvar IMAGE_FEATURES -r core-image-full-cmdline On Sat, Mar 9, 2024 at 10:59 AM Xylopyrographer wrote: > > Thanks for the reply. > > Still a bit green with all this but from the QEMU VM, sshd is running and > port 22 is open. > > Checked by running: > ps aux | grep sshd > and > netstat -plant | grep :22 > > as well, I can telnet in to the VM itself by running (from within the VM): > > telnet localhost 22 > > which returns: > Connected to localhost > SSH-2.0-OpenSSH_9.5 > > So I think all is as it should be on the QEMU side of things? > > Just need the magic keystrokes to get in from outside the VM. > > Any further hints? > > Many thanks. > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62716): https://lists.yoctoproject.org/g/yocto/message/62716 Mute This Topic: https://lists.yoctoproject.org/mt/104819558/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] Cannot ssh into qemu guest
Can you start runqemu without the nographic option, and copy-paste what it prints? There are clues as to how it sets up networking in there. Alex On Sat, 9 Mar 2024 at 19:59, Xylopyrographer wrote: > > Thanks for the reply. > > Still a bit green with all this but from the QEMU VM, sshd is running and > port 22 is open. > > Checked by running: > ps aux | grep sshd > and > netstat -plant | grep :22 > > as well, I can telnet in to the VM itself by running (from within the VM): > > telnet localhost 22 > > which returns: > Connected to localhost > SSH-2.0-OpenSSH_9.5 > > So I think all is as it should be on the QEMU side of things? > > Just need the magic keystrokes to get in from outside the VM. > > Any further hints? > > Many thanks. > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62715): https://lists.yoctoproject.org/g/yocto/message/62715 Mute This Topic: https://lists.yoctoproject.org/mt/104819558/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] Cannot ssh into qemu guest
Thanks for the reply. Still a bit green with all this but from the QEMU VM, *sshd* is running and port 22 is open. Checked by running: *ps aux | grep sshd * and *netstat -plant | grep :22 * as well, I can telnet in to the VM itself by running (from within the VM): * telnet localhost 22* which returns: *Connected to localhost* *SSH-2.0-OpenSSH_9.5* So I think all is as it should be on the QEMU side of things? Just need the magic keystrokes to get in from outside the VM. Any further hints? Many thanks. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62714): https://lists.yoctoproject.org/g/yocto/message/62714 Mute This Topic: https://lists.yoctoproject.org/mt/104819558/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] Cannot ssh into qemu guest
On Sat, Mar 9, 2024 at 09:41 AM, Marco Cavallini wrote: > > In *local.conf* add > *EXTRA_IMAGE_FEATURES = "ssh-server-openssh"* > -- > Marco or better *EXTRA_IMAGE_FEATURES += "ssh-server-openssh" * -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62713): https://lists.yoctoproject.org/g/yocto/message/62713 Mute This Topic: https://lists.yoctoproject.org/mt/104819558/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] Cannot ssh into qemu guest
In *local.conf* add *EXTRA_IMAGE_FEATURES = "ssh-server-openssh"* -- Marco -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62712): https://lists.yoctoproject.org/g/yocto/message/62712 Mute This Topic: https://lists.yoctoproject.org/mt/104819558/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[yocto] Cannot ssh into qemu guest
I've built a QEMU quemuarm64 core-image-full-cmdline machine. Runs fine. I'm launching it with: *runqemu qemuarm64 nographic* Now trying to figure out how to ssh into it. The book I'm following simply states: "You can SSH into this VM with *ssh root@192.168.7.2* " A bit later, going through the exercise of using devtool to add a new recipe, the command line is: *devtool deploy-target bubblewrap root@192.168.7.2* However, both *ssh root@192.168.7.2* and the *deploy-target* commands time out on attempting the ssh connection. * Host is Debian 12 Bookworm * Yocto version is nanbield * Using GNOME Terminal * Launching qemu in one Terminal window, running everything else in a second Terminal window. Any pointers on the magic incantation to get this running? Many thanks. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62711): https://lists.yoctoproject.org/g/yocto/message/62711 Mute This Topic: https://lists.yoctoproject.org/mt/104819558/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-