Skip to content

Instantly share code, notes, and snippets.

@aguinet
Created August 10, 2025 18:08
Show Gist options
  • Select an option

  • Save aguinet/b9f441c70d0519dd0c401f3f286c47da to your computer and use it in GitHub Desktop.

Select an option

Save aguinet/b9f441c70d0519dd0c401f3f286c47da to your computer and use it in GitHub Desktop.
socat server shell with tty support
# Server
$ socat TCP-LISTEN:1111,reuseaddr,fork,bind=127.0.0.1 EXEC:"/bin/sh -i",pty,stderr,setsid,sigint,sane
# Client
$ socat file:`tty`,raw,echo=0 TCP:localhost:1111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment