Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


By posting your answer, you agree to the privacy policy and terms of service.