ssh -R option

Markus Friedl markus.friedl at informatik.uni-erlangen.de
Thu Jun 15 23:47:33 EST 2000


On Mon, Jun 12, 2000 at 11:58:28AM -0400, Kenneth J Baker wrote:
> 
> Dear list,
> 
> I'm relatively new to using ssh.  I'm trying to use the -R option to set
> up a forwarded port between two machines.  Specifically I'd like to be
> able to ssh to machineB from machineA and then have a port on machineB
> that I can connect to machineA with.  If my understanding is correct I'd
> need a command like:
> 	machineA>	ssh -R 10000:machineA:23 machineB

this is correct. the following line does the same:
	machineA>	ssh -R 10000:localhost:23 machineB

> This should open port 10000 on machineB to be forwarded to machineA:23,
> right?  Assuming I have telnet open on machineA I should be able to then:
> 	machineB>	telnet machineB 10000
> 
> For some reason this doesn't work.  Is what i'm trying to do possible?
> Any suggestions?

does
  	machineB>	telnet localhost 10000
work?

if you want to make sshd listen to port 10000 on _all_ interfaces
(default is loopback only) you have to use the GatewayPorts option
for sshd, see sshd(8).

-m





More information about the openssh-unix-dev mailing list