#!/usr/bin/env bash # $1: PTTY ID # $2: TCP server port socat -d -d "file:${1},raw,echo=0" "TCP-LISTEN:${2},reuseaddr"