devops_for_the_desperate icon indicating copy to clipboard operation
devops_for_the_desperate copied to clipboard

[Apple M1 Pro] SSH connection refused upon Debian login via QEMU

Open diffeo-christopher opened this issue 2 years ago • 1 comments

OS: OS X 13.5.2 (22G91) Following the README, I executed:

Command: qemu-system-aarch64 -cpu cortex-a72 -smp cpus=4,sockets=1,cores=4,threads=1 -machine virt,highmem=off -accel hvf -accel tcg,tb-size=2048 -m 2G -initrd initrd.img-5.10.0-11-arm64 -kernel vmlinuz-5.10.0-11-arm64 -append "root=/dev/vda2 console=ttyAMA0" -drive if=virtio,file=debian-dftd-aarch64.qcow2,format=qcow2,id=hd -net user,hostfwd=tcp::10022-:22,hostfwd=tcp::20375-:2375,hostfwd=tcp::5001-:5000 -net nic -device intel-hda -device hda-duplex -nographic (I changed memory from 4G to 2G)

Attempt to login with SSH:

dftd@debian:~$ ssh [email protected] -p 10022
ssh: connect to host 127.0.0.1 port 10022: Connection refused
dftd@debian:~$

Is this expected?

diffeo-christopher avatar Sep 10 '23 23:09 diffeo-christopher

Hey @diffeo-christopher. When you run the qemu-system-aarch64 command, you are dropped right into the running VM. You can tell by your shell prompt dftd@debian. There would be no need to SSH into the host from that shell. You can open another tab in your terminal and try there.

Thanks for supporting me and the book!

Let me know how it goes.

bradleyd avatar Sep 17 '23 15:09 bradleyd

Please reopen if you need help.

bradleyd avatar Jun 27 '24 20:06 bradleyd