문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top