but code is always stop on this line:
or die "login failed: " . $telnet->lastline;
i get the following output:login failed: at test.pl line 21.
Could you please help me to successfully achieve connection to telnet host.
I suppose telnet session filed because on the system where script is running have version of OpenSSH 4.3, but Net::OpenSSH module need OpenSSH 5.4 and upwards for creating tunnels.
In case that i didn't have possibility to upgrade OpenSSH version is any alternatives way to create an ssh tunnel to gateway after that use tunnel to establish a telnet connection to remote host?