X11 Forwarding over SSH? Please help!

April 16, 2015 1.5k views
Linux Commands Linux Basics

Getting the error "cannot connect to X server" when attempting to run graphical programs. I am using XQuartz locally on my mac, and ensured that xauth is installed on my droplet. I modified /etc/ssh/sshd_config to include "AllowTcpForwarding yes" and "X11UseLocalhost yes"

I get this error "cannot connect to X server" both thru the droplet console access screen, as well as when using "ssh -X user@ipaddress"

Am I missing something basic? Thanks a million!

1 Answer

Most servers are what we call "headless", or without a GUI front-end.

Unless you install a front-end, you won't be able to do X11 forwarding because there's no XServer running to forward to your local machine.

Have another answer? Share your knowledge.