problems with -R

Ed Peschko esp5 at
Wed Nov 6 06:08:47 EST 2002

hey all,

I'm using openssh-3.5p1, was trying to set up a 'reverse telnet' session 
(sun solaris 2.6 on both machines). Anyways, I was doing:

server% ssh -R 1111:<server>:2222    <client>

client% ssh -p 1111 <client>

where <server> is behind a firewall and <client> cannot reach <server>
Anyways the idea was to connect to the socket on <client> and having the 
traffic forwarded over to the <server> (hence avoiding a firewall). 
(right now, I'm testing it on 2 machines without firewalls to be simple).

However, this doesn't work; I see an sshd program running on the client box
that corresponds to the server request, I do a netstat -a, and see:

localhost.1111             *.*                0      0     0      0 LISTEN

on the client machine..

However, when I do 'ssh -p 1111 <client>', I get:

ssh: connect to host <client> port 1111: Connection refused.

So.. any clues on what's going on? And how do I set it up so I can see 
what's going on on the client side via ssh -d... I can see debug messages 
for the parent process, *not* the process spawned listening on port 1111.

Anyways, any help would be greatly appreciated, if you need any more info on
configuration, let me know (perl has a -V option to show all compile options,
sort of wondering what the equivalent would be for openssh.)

Thanks much,


(ps - one more thing. When I do 'ssh -R 1111:<server>:2222 <client>', I 
actually *get a shell*. This isn't really the expected behaviour, I would have
thought that it would just open up a port, and run in the background as a 

More information about the openssh-unix-dev mailing list