- ensure remote server enables remote port fwd on non-loopback ip
#/etc/ssh/sshd_config
GatewayPorts yes
- ssh
ssh -R [remote_port]:[destination_address]:[local_port] [username]@[ssh_server]
- check listening hosts from remote server
say remote_port is 18000
:
$ ss -plunt | grep 18000
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
tcp LISTEN 0 128 0.0.0.0:18000 0.0.0.0:* users:(("sshd",pid=2714723,fd=10))