35

Quick QEMU VM setup

Get a Debian VM in QEMU in seconds:

$ wget https://cloud.debian.org/images/cloud/ \
    trixie/latest/debian-13-nocloud-amd64.raw
$ qemu-system-x86_64 -M pc,accel=kvm -m 1G \
        -drive file=debian-13-nocloud-amd64.raw,if=virtio \
        -netdev type=user,hostfwd=tcp::2222-:22,id=net0 \
        -device virtio-net,netdev=net0 -smp 4 -nographic
# Upon first boot, root password is configured
VM$ apt update && apt install openssh-server
VM$ echo "PermitRootLogin yes" > \
        /etc/ssh/sshd_config.d/root_login.conf
VM$ systemctl restart sshd
$ ssh root@localhost -p 2222
Looking for a way to set up a Linux VM with SSH access quickly?🐧 Debian NoCloud images are a great solution. Here’s one way to get one up and running within seconds:
Icon with a waving hand

Get in touch

sigma star gmbh
Eduard-Bodem-Gasse 6, 1st floor
6020 Innsbruck | Austria

sigma star gmbh logo