From: Brian Candler Date: 2009-06-01T21:48:21+09:00 Subject: Re: How can I get command's result code, which executing via ssh Robert Klemme wrote: > This is likely because SSH does not propagate the result of the remote > process. You can find the details on SSH's manpage. Ahem?? 'man ssh' on my system (Ubuntu Hardy) says: ssh exits with the exit status of the remote command or with 255 if an error occurred. A quick test confirms this to be true. So clearly the exit status *is* propagated back. More likely it's just a problem with the OP's use of the Net::SSH API. Now, the Net::SSH API documentation (*) for exec tells you: "success means that the command is being executed, not that it has completed" And if it hasn't completed, obviously you can't get the exit status. I admit the documentation doesn't make it easy to see at a glance how you *should* get the exit status. But in any case, I think it's not helpful to post unverified guesses about the behaviour of such a system. Regards, Brian. (*) http://net-ssh.rubyforge.org/ssh/v2/api/index.html -- Posted via http://www.ruby-forum.com/.