I use rsh to execute some commands in a remote server .

if the command or the parameters of the command is valid , everything goes smoothly . but if the command is not valid or the parameters of the command is not valid nothing returned from rsh.

so does anyone of you explain why does it happen ? thanks.

  • 4
    Why are you still using rsh instead of the more secure ssh? – user1686 Sep 24 '09 at 12:12
  • I second grawity's comment. You are using the wrong tool - rsh is quite insecure. Instead use ssh user@server "command". ssh will return both stdout and stderr and also return exit codes. – Aaron Brown Sep 24 '09 at 23:36

How are you running rsh? Manually or via a script/program?

Are you capturing stderr as well as stdout? Try adding 2>&1 to the end of your command to make stderr be redirect to stdout.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy