Let SOcket CAT Be Thy Glue over Serial
bloggerbust.ca
bloggerbust.ca
screen /dev/ttyS0
screen /dev/ttyUSB0 115200
You can specify baud rate (defaults to 9600), and a number of other parameters. Some of these are nicely documented at https://www.cyberciti.biz/faq/unix-linux-apple-osx-bsd-scree... if you dislike reading the entire man page for screen(1). miniterm.py /dev/ttyUSB0 115200
It's just a basic serial terminal but it covers all of my use cases (mostly interfacing with embedded devices).[0]: https://www.youtube.com/channel/UCsRWsHhvzSoMgVfiNhy0NoA
My torrent daemon has no business permanently exposing the Web controls on any network interface - not even localhost, because localhost is potentially accessible by untrusted stuff running in the browser.
I solve this by placing it inside a dedicated, firewalled container, and using socat to forward from a local socket (browser can't access) to the network one. When I need to connect to it via the browser, I do the opposite forwarding (SSH can also forward to local sockets).
Backing up a disk:
alice$ pv /dev/sda | lzop | socat - tcp:bob:1234
bob$ socat tcp-listen:1234 - > alice.sda.lzo
Copying a bunch of files: alice$ tar c dir | lzop | socat - tcp:bob:1234
bob$ socat tcp-listen:1234 - | lzop -d | pv | tar xOn OSX I haven't been able to get screen to work properly, not sure why; I've just used minicom.
The issue with socat (and some other tools) is the esoteric argument syntax. Arguments should always be passed as "-s arg" for short option names, or more preferably "--long-name argument" as long names, and multiple different things should be passed as multiple different arguments instead of some crammed way.
The "cramming" allows the 2nd, 3rd, etc, argument to contextually tie to the first. Like: "/dev/ttyUSB0,b115200,rawer"