• 1 reply
  • Latest Post - ‏2008-06-03T20:56:50Z by SystemAdmin
262 Posts

Pinned topic Error 8006 CWB0999 when attempting to connect via an SSH tunnel

‏2008-05-28T23:57:35Z |
We are receiving the following error message when we attempt to connect from a Linux server to an AS/400, by using the iSeries Access for Linux software. What is the solution to this problem?

  1. isql -v my400db
28000unixODBCIBMiSeries Access ODBC DriverCommunication link failure. comm rc=8006 - CWB0999 - Unexpected error: unexpected return code 8006, Password length = 0, Prompt Mode = Never, System IP Address =
ISQLERROR: Could not SQLConnect

We have a Linux computer (i.e., a firewall computer (i.e., and an AS/400 computer (i.e. that is behind the firewall computer. We are attempting to make the connection through an SSH tunnel, from the Linux client computer, through the firewall computer, and finally to the AS/400 computer, as pictured below.

Linux <--> Firewall <--> AS/400
( ( (

We are using the following command on the Linux computer to create the SSH tunnel. SSH on the firewall is set to port 1815. We assume that traffic for the iSeries Access for Linux goes over port 8471 (is this correct?), so we have included that. is the AS/400 computer. We assume that the traffic should be directed to port 446 on the AS/400 (is this correct?). is the firewall computer.

/usr/bin/ssh -p 1815 -N -L8471: user@

The odbc.ini content appears below.

Description = iSeries Access ODBC Driver DSN for iSeries
Driver = iSeries Access ODBC Driver
System = localhost
UserID = example
Password = example
Naming = 0
DefaultLibraries = QGPL
Database =
ConnectionType = 0
CommitMode = 2
ExtendedDynamic = 0
DefaultPkgLibrary = QGPL
DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512
AllowDataCompression = 1
LibraryView = 0
AllowUnsupportedChar = 0
ForceTranslation = 0
Trace = 0

We currently have an older Linux computer that successfully connects to the same AS/400 using an SSH tunnel, but it is using old DB2 Version 8 Client Connect software. That old Linux computer is successfully using the following command to create the SSH tunnel.

/usr/bin/ssh -p 1815 -N -L5001: user@

Thanks for any help.

Message was edited by: chrisa2
Updated on 2008-06-03T20:56:50Z at 2008-06-03T20:56:50Z by SystemAdmin
  • SystemAdmin
    262 Posts

    Re: Error 8006 CWB0999 when attempting to connect via an SSH tunnel

    The solution to this problem was to connect to port 8471 on the AS/400 instead of port 446. Connecting to the DDM port (i.e. 446) did not work for some reason. The SSH tunneling has been updated accordingly, like below.

    /usr/bin/ssh -p 1815 -N -L8471: user@