I use libssh 0.5.2 binding for C under Linux. In my program I create SSH
tunnel to XenServer. It worked perfectly until I updated to the most
recent XenServer 6.2. After it ssh tunneling started failing with
[1] Analyzing banner: SSH-2.0-OpenSSH_4.3
[1] We are talking to an OpenSSH client version: 4.3 (40300)
[1] placing 18 bytes into channel buffer (stderr=0)
[1] Error : Channel opening failure: channel 44 error (2) Connection refused
On server side there is records in /var/log/secure:
Sep 24 20:12:10 proxima sshd[20782]: pam_unix(sshd:session): session
opened for user root by (uid=0)
Sep 24 20:12:10 proxima sshd[20792]: Accepted password for root from
10.250.144.221 port 55673 ssh2
Sep 24 20:12:10 proxima sshd[20792]: pam_unix(sshd:session): session
opened for user root by (uid=0)
Sep 24 20:12:11 proxima sshd[16132]: channel_by_id: 0: bad id: channel free
Sep 24 20:12:11 proxima sshd[16132]: Disconnecting: Received ieof for
nonexistent channel 0.
Sep 24 20:12:11 proxima sshd[16132]: pam_unix(sshd:session): session
closed for user root
The most strange is the ssh server version is the same on old and new
servers:
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
I'm not sure how to debug such an issue. Sometimes tunnel establishes
and works but it is 1 out of 100 tries.