Reputation: 971
I need to know if is possible to put a local port in a remote machine via ssh tunneling
Example
Machine A: port 80
Machine B: Nothing
Inside Machine A (important, because A can see B, but B can't see A)
A> ssh -f -N -? 80:B:8585 user@B
result
Machine A: port 80
Machine B: port 8585 (really A:80)
Thanks in Advance
Upvotes: 0
Views: 1395
Reputation: 47042
You need the -R
switch
ssh -f -N -R 8585:localhost:80 user@B
localhost
is from A's perspective, so it means to forward port 8585 on B to port 80 on A.
See also the RemoteForward
setting in your ~/.ssh/config
.
Upvotes: 1