Friday, December 4, 2009

Speeding and Compressing X forwarding Traffic

To run the an X application over SSH connection, you can use the
$ ssh -X user@computername.com

Do note that for the remote Server shich you are connecting to must have X forwarding enabled. To configure, go to /etc/ssh/ssh_config/
X11Forwarding yes

If the SSH is setup with trusted X11 Forwarding ie in the /etc/ssh/ssh_config file,
ForwardX11Trusted yes

You can compress and speed up the X forwarded connection
$ ssh -Y -C user@computername.com
  • -Y to enable trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls. So it will boost speed.
  • -C to compress the data

1 comment:

Eon said...

I was expecting some improvement but wow. I had been using X forwarding to use a VM I have as an FTP proxy between two servers by running Filezilla. It used to be so slow and unresponsive and used a lot of bandwidth even when it wasn't really doing anything. Thanks for the `-Y -C` tip.