Strange Behaviour of ssh-tunnel

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
a few days ago i got a good tip, how to connect my router for
administration tasks from my wlan-notebook via an ssh-tunnel over the
desktop-pc to avoid an unsecure wlanconnection between the notebook and
the router:

ssh -N -L 9080:router-ip:80 user@desktop

and then connect to localhost:9080 in the webbrowser. This works fine
and i thougt, i understood very well how it works. Nevertheless, today i
was surprised: I thougt, to simplify the ssh-command, i put a line    router

to my /etc/hosts and then i tried the following (i can connect with
telnet to):


PBook:~ wolfgang$ ssh -N -L 9023:router:23 wolfgang@hppav &
[1] 12937
PBook:~ wolfgang$ telnet localhost 9023
Trying ::1...
Connected to localhost.
Escape character is '^]'.
channel 2: open failed: administratively prohibited: open failed
Connection closed by foreign host.
PBook:~ wolfgang$ ssh -N -L 9023: wolfgang@hppav &
[2] 12940
PBook:~ wolfgang$ bind: Address already in use
channel_setup_fwd_listener: cannot listen to port: 9023
Could not request local forwarding.
ssh -N -L 9123: wolfgang@hppav &
[3] 12942
PBook:~ wolfgang$ telnet localhost 9123
Trying ::1...
Connected to localhost.
Escape character is '^]'.

Password: ******


It was surprising to me, that the first connection was refused, while
the second one was accepted. Maybe anyone could explain to me, what
happens at there.

Thank you very much

Re: Strange Behaviour of ssh-tunnel

The token you changed is interpreted on the remote side, not the local.

  Richard Silverman

Re: Strange Behaviour of ssh-tunnel

Richard E. Silverman schrieb:
Quoted text here. Click to load it
Yes. That was it.
I am not really shure, that i love computers. Thy are to logic!

Site Timeline