Gnome Boxes & SSH Portforwarding

Gnome Boxes als Flatpak auf Fedora Silverblue. Funktioniert gut. Ab und zu möchte man jedoch auch mal eine SSH Verbindung in das Gast-System. Die spartanischen Konfigurationsmöglichkeiten im GUI geben das nicht her.

$ flatpak ps
Instance   PID    Application     Runtime
3226497706 276196 org.gnome.Boxes org.gnome.Platform

$ flatpak enter 3226497706 /app/bin/virsh list
 Id   Name           State
------------------------------
 1    centos7.0-ne   running

$ flatpak enter 3226497706 /app/bin/virsh qemu-monitor-command centos7.0-ne --hmp "help hostfwd_add"
hostfwd_add [hub_id name]|[netdev_id] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport -- redirect TCP or UDP connections from host to guest (requires -net user)

$ flatpak enter 3226497706 /app/bin/virsh qemu-monitor-command centos7.0-ne --hmp hostfwd_add ::2222-:22 

$ ssh -p2222 root@localhost
root@localhost's password:  
Last login: Tue Feb  9 06:37:51 2021 from gateway
 
$ flatpak enter 3226497706 /app/bin/virsh qemu-monitor-command centos7.0-ne --hmp hostfwd_remove ::2222
host forwarding rule for ::2222 removed

 
Die Konfiguration ist nicht persistent.

Beliebte Posts aus diesem Blog