Skip to main content

How do I enable X forwarding over an ssh connection?

To enable X forwarding over an ssh connection you must invoke ssh with the -X option:

 $ ssh -X hostname 

 

If you try and launch on a program on a remote host and get the message

 Error: Can't open display:

It's probably because you didn't use the -X option.