Run it again and while it's ok, run "netstat -an" and find the socket for the connection. rshd reads the input for the command until it get EOF. Then it runs the command. So the socket will probably be half-closed and in CLOSE-WAIT. Now let the NT box get that message. Look again in "netstat -an". Did the socket change? If not, the problem is not on the unix system.
A possible cause of "connection reset by peer" is that the NT box is seeing a second box somewhere with the same IP address as the Unix system.
well, you are right
when we run the rsh with our program its open a several sockets...
but all of then are like the example that I send, I made a mistake with the paste socket but still is the same results.