Ssh – More efficient X-forwarding

performancesshxforwarding

I open GUI remote programs by SSHing with the -X (or -Y) flag, e.g.,

$ ssh -Y user@host.com

Recently, I found there is a much more efficient way to do this with web browsing only:

$ ssh -DNNNN user@host.com

where NNNN is a four digit port number. Then I configure my local browser to connect through a proxy via port NNNN. This is much more efficient than the first SSH method because all the GUI information does not need to be transported through the tunnel, only the web data I am requesting.

My question is: is there a more efficient way to SSH with X-forwarding in general? Maybe some scheme that utilizes local libraries or rendering or something to aid in operating a GUI program hosted remotely?

Best Answer

You are mixing up terms. The first thing is X11 forwarding and it is inefficient by definition and you can't do almost anything about that (it is not made for high-latency connections and decades ago]. In comparison to the other method, it is inefficient, because it is transferring whole gui (of broswer?) over the newtwork.

The other is SOCKS proxy (completely different thing) and it transfers only the network data you are interested in (encapsulated in the SOCKS protocol and SSH), which is obviously more efficient.

Your question is asked in the way that it is not possible to answer. What are you trying to achieve? Run GUI programs? Proxy network connections? Something totally different?

Related Question