August 30, 2011

simple telnet server by using socat

On server side:

./socat exec:'bash -li',pty,stderr,setsid  tcp-listen:8999,reuseaddr

On client side:

./socat tcp-connect:127.0.0.1:8999 file:`tty`,raw,echo=0

3 comments:

  1. how to do it with other serial device ports please, like /dev/ttyS0
    This is not working
    ./socat exec:'bash -li',/dev/ttyS0,stderr,setsid tcp-listen:8999,reuseaddr

    ReplyDelete
  2. Perfect, just what I was looking for. Thanks.

    Aaron Moate
    CHTC Infrastructure Team

    ReplyDelete
  3. This provided me the solution I was looking for. Thank you.

    ReplyDelete