1

I am using this command

socat -lm -d -d TCP4-LISTEN:5555,reuseaddr,fork EXEC:/bin/myscript,chroot=/root/,su=root,pty,stderr

to start a server but when i send the i connect to it through netcat and send some input, it sends back input+output . Why is that ? I don't want my input back .

Terminal 1:

socat -lm -d -d TCP4-LISTEN:5555,reuseaddr,fork EXEC:/bin/myscript,chroot=/root/,su=root,pty,stderr

Terminal 2:

root@vm:echo "AAAAAA" | nc localhost 5555
AAAAAA[i don't want this to be coming back to me]
output(AAAAAA)

5
  • Can you maybe elaborate a little bit more, like paste netcat command you are using, and show what you mean by "it sends back input+output"? Commented Jun 29, 2014 at 5:45
  • Done! tell me if u need anything extra. Commented Jun 29, 2014 at 7:42
  • 1
    I believe you seeing your input is just a result of you specifying the pty option. How is this used, do you need the pty option? Commented Jun 29, 2014 at 10:57
  • @HåkanLindqvist - Please can you create answer based on your comment ? Commented Oct 2, 2014 at 10:00
  • @IwanAucamp Created an answer out of my previous comment. Commented Oct 12, 2014 at 9:50

1 Answer 1

2

The input being echoed back to the client is a result of using the pty option.

If there is no requirement for having pty the easiest solution would be to simply drop that from the command line.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .