The ssh client does not always return exit code 255 when it a client error occurs, as it is documented in the man page. For example, a refused or timed out connection returns exit code 1, while a unknown hostname returns 255. This makes automating tasks using ssh tricky, as I can't be sure if the exit code comes from the remote command or the client when there is a connection problem. About 6 months ago, someone posted a report on the mailing list detailing the exact same problem, see: http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=111754196015597&w=2 I wondered if it could be possible to correct this in the client in the future. If the behaviour is normal, then the man page should then be updated, as currently this is ambiguous. Thanks
Created attachment 1048 [details] exit(255) for ssh internal errors Fair enough. I think this patch gets the appropriate ones.
The patch has been applied. It will be in tomorrow's snapshot and the 4.3 release. Thanks for the report.
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.