简体   繁体   中英

SSh remote tunnel, am I missing something?

I want to make a local port that serve a python http.server accessible to the internet without messing around with port-forwarding on my home router, tunnelling it on a digital ocean vps. My local port is 8080, the port on the remote vps 4444, just for example

ssh -i .ssh/mykey -R 4444:localhost:8080 root@myvpsip

But still http://myvpsip:4444 is not accessible

ufw is disabled on the vps..What am I missing?

For the forwarded port to listen on any address (and not just localhost ) you need to prepend an additional : to the forward specification.

ssh -i .ssh/mykey -R :4444:localhost:8080 root@myvpsip

Additionally, you must have GatewayPorts yes or GatewayPorts clientspecified on the server-side sshd configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM