forwarding not working

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

Threaded View
My friend's ISP blocks connections from otuside to her port 22. So we
are trying forwarding. The command she gave at her local Linux box is,
ssh -l prachi -v -R 9999:localhost:22

Then I connected to server and did ssh -p 9999 but
ssh_exchange_identification: Connection closed by remote host

On her side she saw this,
debug1: client_input_channel_open: ctype forwarded-tcpip rchan 3 win
131072 max 32768
debug1: client_request_forwarded_tcpip: listen port 9999,
originator port 34688
debug1: fd 7 setting TCP_NODELAY
debug1: channel 1: new []
debug1: confirm forwarded-tcpip
debug1: channel 1: connected
debug1: channel 1: read<=0 rfd 7 len 0
debug1: channel 1: read failed
debug1: channel 1: close_read
debug1: channel 1: input open -> drain
debug1: channel 1: ibuf empty
debug1: channel 1: send eof
debug1: channel 1: input drain -> closed
debug1: channel 1: rcvd eof
debug1: channel 1: output open -> drain
debug1: channel 1: obuf empty
debug1: channel 1: close_write
debug1: channel 1: output drain -> closed
debug1: channel 1: rcvd close
debug1: channel 1: send close
debug1: channel 1: is dead
debug1: channel 1: garbage collecting
debug1: channel_free: channel 1:, nchannels 2

What does this mean exactly? What is wrong with our commands?
She is using
$ ssh -V
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
on her RH 9.0 Linux machine.

Can someone tell me what exactly is wrong?

Thanks in advance.
With warm regards,

Re: forwarding not working

Quoted text here. Click to load it

If no one from outside can connect to her on port 22 anyway, then
probably a better option would be to have her server give up on port 22
and listen on a different port in the first place, i.e. by putting

Port 9999

into /etc/ssh/sshd_config.

Quoted text here. Click to load it

Eh?  So you were already connected to  How?  Not by ssh,
because that's running on port 22, which is blocked.  Telnet?  Yikes!  
There goes your security.

This sounds too complicated.  Instead of connecting to, then
connecting from there to localhost:9999 which is forwarded to
localhost:22, why not just run the server on in the first
place?  Then only one connection is needed, not 3.

Or, if for some reason her ssh server has to listen on port 22, then
just connect to, which will be forwarded (per your friend's
command) to localhost:22.

I don't if these are causing your connection troubles, but simplifying
could help.

Good luck,

To reply by email, replace "" by ""

Re: forwarding not working

Quoted text here. Click to load it

Thanks a lot for the patience and help.
I don't want to do that  because she needs ssh internally running on
port 22 and I don't trust her to make changes or internal
portforwarding because she is a non-techie. She is not on a static IP,
on broadband.
Quoted text here. Click to load it

Sir, is a different server belonging to another friend and is
on static IP.  She connects there, I connect there and then I want to
connect to her machine through the machine to her dynamic IP
machine. Are you getting the picture or shall I try to send an ascii

Or else you can suggest a complete different solution. My basic
requirement is that I want to connect to her server (which is on
dynamic IP) and her ISP is blocking attempts from outside. The
apparatus I have is 1 Linux box at my end (which is also on dynamic
IP), 1 Linux box at (static IP and permanent connection) and
her Linux box (dynamic IP).

Any ideas?
Thanks a lot for the help.

With warm regards,

Site Timeline