0

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.

2
  • 4
    Why are you still using rsh instead of the more secure ssh? Sep 24, 2009 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. Sep 24, 2009 at 23:36

1 Answer 1

1

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.

You must log in to answer this question.