reverse tunneling problem..

arri

Registered
hoi!

i'm trying to setup a reversed ssh-tunnel from my powerbook to my server, using the following command:

ssh -nNT -R 8013:localhost:4321 myserver.org

the command executes, prompts for my password, and then waits..
so it seems to be setup..but then when i login on the server, to see if i can connect back to my local machine, nothing works.

i've tried running a server locally (using netcat) and then telnet to there from the remote machine.. initially telnet sais it's connected, but then quits..(Connection closed by foreign host).
when i on purpose telnet to a wrong port, it says connection refused, which indicates there actually is a tunnel.

i've also tried it locally, with two macs, but i get the same result.

what am i doing wrong?


thanks
arri
 
ok, great. i start to get it now..

appearantly i was doing things the wrong way around.
i have it -sort of- working using the tunneling-command like this:
ssh -nNT user@server.org -R 2222:127.0.0.1:3333

when, on the machine creating the tunnel, run netcat -lp 3333 and then from another machine login on server.org, i can telnet to localhost port 2222, and talk to the netcat server on the first machine.

but when i run the tunnel to forward to local port 22, like this:
ssh -nNT user@server.org -R 2222:127.0.0.1:22

..and i login to server.org, i never manage to login to localhost:2222 ..
i always get the error "hostkey verification failed".

what key failes to verify?
do i need to have a key pair installed on server.org and the machine creating the tunnel in order to be able to ssh to that machine from the server?

if so, why can't i just login with a password?

thanks
arri
 
i just found that this last problem is related to my server-config.
since that's a debian machine, and this an osx-forum, i wont bother you anymore.. :)

thanks.
 
Back
Top