ssh tunnel // "telnet localhost tunnel_port" works, from remote host "telnet hostname tunnel_port" fails

From: Vince (vince_v_at_lycos.de)
Date: 04/22/05


Date: 22 Apr 2005 03:18:52 -0700

Hi Guys,

I got a SUSE linux box with OpenSSh installed.
<hostname>:/proc # uname -r
2.4.21-138-smp
<hostname>:/proc # ssh -Version
OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090607f

I use "ssh <remotehost_1> -L 54321:<remotehost_2>:23 to build a ssh
tunnel for a telnet session to remotehost_2 (which can not be accessed
from my linux box directly). remotehost_2 is a HPUX box, could be
anything else too

When I use "telnet localhost 54321" on my linux box this works fine

When I use "telnet <hostname> 54321" on my linux box it fails
hprtdc14:/proc # telnet <hostname> 55555
Trying 12.23.34.45...
telnet: connect to address 12.23.34.458: Connection refused

When I use "telnet <hostname> 55555" from a remote box (windows -
could be anything else too) it fails
C:\>telnet <hostname> 55555
Connecting To <hostname>...Could not open connection to the host, on
port 55555: Connect failed
C:\>

I assume my linux box refuses connections from hosts other than
localhost. Further on I see in netstat that only 127.0.0.1 is listened
on (not on its IP)
<hostname>:/proc # netstat -an | grep 55555
tcp 0 0 127.0.0.1:55555 0.0.0.0:*
LISTEN
tcp 0 0 ::1:55555 :::*
LISTEN
<hostname>:/proc #

Compared to windows: In putty I have an option "Local ports accept
connections from other hosts"

Is there somthing similar on linux? I want to use my ssh tunnel from
other hosts than localhost.

best regards,
Vince



Relevant Pages

  • Re: What is The SSH?
    ... Building and Using SSH Tunnels ... What is an SSH tunnel? ... how to use it to make a connection to a server. ... You will need a working SSH client and server installation to build and test ...
    (microsoft.public.windows.server.networking)
  • SSH TCP forwarding: works with v1, not with v2 ssh
    ... that they're setting up the tunnels with no problem, ... I can get to the work ssh daemon: ... debug1: Connections to remote port 65002 forwarded to local address palimpsest:22 ... something answers (if I get "connection refused" there's no listener); ...
    (FreeBSD-Security)
  • Re: SSH TCP forwarding: works with v1, not with v2 ssh
    ... >that they're setting up the tunnels with no problem, ... >I can get to the work ssh daemon: ... > debug1: Entering interactive session. ... > Connection closed by foreign host. ...
    (FreeBSD-Security)
  • Re: sftp over two connections
    ... from there I log onto LIN and I can work on the console. ... > X tunneling works as well, and I tunnel additional ports to control ... > connection be tunneled through SSH so that I could mount LIN's ...
    (comp.security.ssh)
  • Setting up my own proxy server on Linux... any suggestions?
    ... I'm currently stuck behind a firewall at my college, ... "Linux box" refers to the computer running Debian GNU/Linux outside ... - My computer would establish some sort of connection with the Linux ... Since SSH cannot natively tunnel ...
    (comp.os.linux.networking)