Take the 2-minute tour ×  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.  share|improve this question Why are
you still using rsh instead of the more secure ssh? –  grawity
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
1 Answer 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.  share|improve this answer  Your Answer