Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
3  
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
add comment

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
add comment

Your Answer

 
discard

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