hello, I try to use ssh in a script (ttt.ksh) like this: #!/bin/ksh ssh <hostname> date echo $? if I start ttt.ksh, it will always work and return 0. if I start ttt.ksh without a tty, e.g. "echo ttt.ksh|at now", it will always work, but the return code will be unpredictable 255 or 0. any hints or solutions? best regards Norbert Weuster
the optinal Flags -n and/or -T doesn't change the situation
after creating user "sshd" and/or a reboot, the problem couldn't be reproduced. best regards Norbert Weuster
can reproduce situation again. problem still exists
I have the same problem. The script as follows is run from cron: while [ 1 ] do ssh <hostname> date echo $? done The script returns 255 anywhere from 2-20% of the time when run from cron and works perfectly fine when run from the command line. I am running the test on AIX 4.3.3.0 and OpenSSH_2.9p1, SSH protocols 1.5/2.0, OpenSSL 0x0090581f John O.
Please verify that this is still the case with 3.5p1 (2.9 is ooold)
It appears to be fixed with the latest versions, I've tested this with OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090605f
IBM provides the "aix toolbox for linux apps" only with the versions openssh-3.4p1-5.aix4.3.ppc.rpm openssh-server-3.4p1-5.aix4.3.ppc.rpm openssh-clients-3.4p1-5.aix4.3.ppc.rpm openssl-0.9.6e-2.aix4.3.ppc.rpm so I tested these versions and I cannot reproduce the bug again. best regards Norbert Weuster
I have the same problem with OpenSSH_3.5p1 Debian 1:3.5p1-4, SSH protocols 1.5/2.0, OpenSSL 0x0090701f when I'm trying connect to non-exist host from the shell it returns 0 on one pc and 1 on another one. But when I do it on the first pc from the script it returns 1. Anyway it looking strange.
It is certainly fixed in -current: [djm@xenon djm]$ for x in 1 2 3 4 5 6 7 8 9 10 ; do ssh djm@localhost exit $x ; echo $? ; done 1 2 3 4 5 6 7 8 9 10 It is also in the regress tests.
*** Bug 587 has been marked as a duplicate of this bug. ***
Mass change of RESOLVED bugs to CLOSED