Skip to content

Instantly share code, notes, and snippets.

@aconz2
Created February 12, 2021 22:55
Show Gist options
  • Save aconz2/b6bac9bfd9ff371b3c946541e9d9d70b to your computer and use it in GitHub Desktop.
Save aconz2/b6bac9bfd9ff371b3c946541e9d9d70b to your computer and use it in GitHub Desktop.
proxy serial port from laptop to virtual machine running on a server
# on server that has virtual machine, IP is 192.168.1.207
# in virt-manager, add a serial port, it will show up as /dev/pts/something
sudo socat -d -d file:/dev/pts/1 TCP-LISTEN:9090
# on laptop that is plugged into device, -x will log communication as hex
sudo socat -x -d -d /dev/ttyUSB0,b9600,raw TCP:192.168.1.207:9090
# then remote into virtual machine and use the serial port!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment