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 [email protected]* "
A bit later, going through the exercise of using devtool to add a new recipe, the command line is:
*devtool deploy-target bubblewrap [email protected]*
However, both *ssh [email protected]* 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.
In *local.conf* add*EXTRA_IMAGE_FEATURES = "ssh-server-openssh"*
--
Marco
Quoted 5 lines · Marco Cavallini
In *local.conf* add
*EXTRA_IMAGE_FEATURES= "ssh-server-openssh"*
--
Marco
or better*EXTRA_IMAGE_FEATURES += "ssh-server-openssh"
*
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.
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
Quoted 34 lines · Xylopyrographer
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 :22as 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.5So 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/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
See if you have debug-tweaks in IMAGE_FEATURES you can easily check it with bitbake-getvar IMAGE_FEATURES -r core-image-full-cmdline
Quoted 35 lines · Xylopyrographer
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 :22as 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.5So 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.
You automatically follow any topics you start or reply to. View/Reply Online (#62714): https://lists.yoctoproject.org/g/yocto/message/62714
Mute This Topic: https://lists.yoctoproject.org/mt/104819558/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 14 lines · Xylopyrographer via lists.yoctoproject.org
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*
Quoted 5 lines
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 2222 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
Signature · 5 lines
Navimatix GmbH Tatzendpromenade 2 D-07745 Jena Geschäftsführer: Steffen Späthe, Jan Rommeley Registergericht: Amtsgericht Jena, HRB 501480
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 [email protected]', maybe you need to check the iptables rules of your host. Is it reachable? 'ping 192.168.7.2'?
Regards,
Qi
Quoted 31 lines · Xylopyrographer
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 [email protected]*"
A bit later, going through the exercise of using devtool to add a new recipe, the command line is:
*devtool deploy-target bubblewrap [email protected]*However, both *ssh [email protected]* 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/7304865 Group Owner:[email protected] Unsubscribe:https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-