| Summary: | ssh returns non-zero return code but appears to work | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | John Canger <jcanger> |
| Component: | ssh | Assignee: | OpenSSH Bugzilla mailing list <openssh-bugs> |
| Status: | CLOSED DUPLICATE | ||
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | -current | ||
| Hardware: | All | ||
| OS: | AIX | ||
|
Description
John Canger
2003-06-05 07:01:05 AEST
exit(255) usually happens on fatal errors. how can i reproduce your problem? Duplicating the bug: Server A issues an ssh to Server B. The ssh kicks off a script on Server B. The script on Server B scp's a file from Server A and stores it on Server B. Run this repeatedly so see if any -1 exit status codes are seen, even though the scp appears to function. Note: I happened to notice the ssh verion on these pair of servers is OpenSSH 2.9.2. I thought I saw something somewhere where 2.9.2 returns inconsistent exit status codes. this works fine for me:
rm -f /tmp/ls2
while date; do
ssh -oBatchMode=yes -A localhost \
scp localhost:/bin/ls /tmp/ls2
if [ $? -ne 0 ]; then
echo ssh failed
fi
cmp /tmp/ls2 /bin/ls
if [ $? -ne 0 ]; then
echo scp failed
fi
rm -f /tmp/ls2
done
This is probably a dupe of bug #341 which has not been sighted for a long while (version-wise). Thinking about it this might be a variant of bug #375. If so it's been fixed since 3.6p1, so please try to replicate with the latest version (3.6.1p2). Previously sshd would deref some random location right at the end of the session which would account for the random nature. If this is the case you'll see Software Program errors in "errpt -a" on AIX in at least some cases. Will instruct user to upgrade SSH version. This problem has not surfaced on any other installations running more current SSH levels. *** This bug has been marked as a duplicate of 341 *** Mass change of RESOLVED bugs to CLOSED |