Ssh – downside to enabling X11 forwarding in ssh

opensshsshx11

For some remote work, I sometimes use X11 forwarding on ssh connections, but usually don't. But, instead remebering to use the -X flag on my ssh connection, I can also set ForwardX11 yes to enable it by default.

My question is, is there any (significant) downside to having X11 forwarding always enabled while not actively using it?

I am using OpenSSH for this, server runs version 5.9, client 6.6.

Edit: I mean enabling it on a per host basis, in $HOME/.ssh/config, not globally.

Best Answer

When writing about this topic, I recommend reading through this paper:

http://www.giac.org/paper/gcih/571/x11-forwarding-ssh-considered-harmful/104780

It describes the consequences of letting ForwardX11 option turned on by default in really nice and prosaic way.

But to sum this up, yes, you should turn this off by default and let it on only for trusted servers where you actually need it in your local ~/.ssh/config file.

Untrusted machine is basically each machine, where somebody else has a root access, because that root can access your whole local X11 session, which is basically a thing you don't want from server in remote data-center or for internet facing machine that could be compromised.

Related Question