Bug 421011
| Summary: | ssh returns wrong exit status | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mikel Ward <mikel> |
| Component: | openssh | Assignee: | Tomas Mraz <tmraz> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 8 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2007-12-19 23:13:20 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
I cannot reproduce this problem here. Can you try ssh -vvv localhost false? Sorry, there was something wrong with my environment. ssh was actually a wrapper script and the wrapper was doing something wrong. |
The ssh man page says: ssh exits with the exit status of the remote command or with 255 if an error occurred. On my Fedora 8 install (openssh-4.7p1-4.fc8), it doesn't matter whether the remote command succeeds or fails, the exit status is always 0. $ ssh localhost true $ echo $? 0 $ ssh localhost false $ echo $? 0 The expected result is that "ssh localhost false" returns an exit status of 1. My CentOS 5 install has openssh-4.3p2-24.el5 and it works fine. I've tried as myself and as root, in case my own shell configuration is the cause, but I get the same result.