I'm trying to create a scenario to test a simple ssh tunneling, just for using a simple telnet.

I have two hosts: ubuntu and suse. Both of them have the other hostname on /etc/hosts file for address translation.

Ubuntu: I verified and I can connect perfectly via telnet on port 23, as well as ssh via port 22 (with all id_rsa.pub and stuff in order to login via ssh without typing password).

On suse I tried:

 ssh -f ubuntu@ubuntu -L 9000:ubuntu:23
 telnet localhost 9000

then I get:

suse@suse:/etc/ssh> telnet localhost 9000
Trying ::1...
Connected to localhost.
Escape character is '^]'.
channel 2: open failed: administratively prohibited: open failed
Connection closed by foreign host.

Any ideias of that error?


Try the this command:

ssh -f ubuntu@ubuntu -L 9000:localhost:23

If this works, it may be a host file issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.