2

Is there any way to forward all VNC ports (59XX) from remote machine to local machine 59XX ports?

Currently I have aliases that do the following:

ssh -p <remote_port> remote_ip -L5901:localhost:5901 -L5902:localhost:5902 -L590...

I have to frequently login to a lot of VNC sessions.

I was wondering if there is any way (like wildcard) to forward all 59XX ports to my local 59XX ports? e.g. ssh -p <remote_port> remote_ip -L59**:localhost:59**

without putting nearly hundreds of -L switch to my ssh command?

  • 2
    Start a local socks proxy with -D 1080 and configure your vnc client to use this proxy. This options is called dynamic application-level port forwarding. – ingopingo Feb 25 '17 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.