Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the 'Necessary and sufficient ssh port forwarding' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Necessary and sufficient ssh port forwarding
Authored by: cobbe on Tue, Nov 20 2007 at 4:09AM PST

If you execute the first ssh command (fixed as described in the other posts) on the client machine (i.e., the one that you want to use to control the other), then that will encrypt all communication between client and server. Additional ssh port forwarding is unnecessary.

Indeed, the ssh command in Rob's edit doesn't really accomplish anything here. It takes all packets destined for port 1202 on the server machine and forwards them to port 5900. With this setup, though, you won't be sending any packets to port 1202 on the server side -- they're going to port 1202 on the client side, and the first ssh command takes care of the necessary forwarding.

Finally, if the server machine has a globally-visible hostname, you can use that instead of the IP address in the ssh command.



[ Reply to This | # ]
Necessary and sufficient ssh port forwarding
Authored by: Bigc on Tue, Nov 20 2007 at 8:53AM PST
...and I thought this was a simple Hint...

[ Reply to This | # ]
Necessary and sufficient ssh port forwarding
Authored by: osxpounder on Mon, Nov 26 2007 at 9:17PM PST
So what's the proper command to create a secure tunnel for using a VNC connection to remotely control my Mac?

[ Reply to This | # ]
Necessary and sufficient ssh port forwarding
Authored by: wallybear on Fri, Jan 11 2008 at 5:44PM PST
I had successful connections using the following command:

ssh -N -f -L 5999:127.0.0.1:5900 user@remoteMac

after authentication, launch Chicken of the VNC (or your preferred VNC viewer) and use localhost:5999 as destination server.

[ Reply to This | # ]