Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can I connect to a GUI in my server using SSH? Can I then use Remote Desktop to control my server using a GUI? The server is Linux CentOS.

share|improve this question

migrated from Jun 7 '11 at 21:32

This question came from our discussion, support, and feature requests site for system and network administrators.

SSH allows you to use X-forwarding with the -X switch. You'd connect with that switch in the command line, then any GUI tools you execute (except Firefox, without a special switch added to that) will appear on your local machine but will be running on the remote system.

Other options are to run VNC on the Linux system and connect to it with a VNC client (although I'd use SSH to tunnel the connection and keep it encrypted).

CentOS may have a tool built in to enable a remote GUI control like Ubuntu now allows.

share|improve this answer
Check the value of X11Forwarding in /etc/ssh/sshd_config it should be yes. I think you also need an RPM called xorg-x11-xauth installed. – davey Jun 7 '11 at 21:45
Easy to setup VNC and tunnel it through SSH. See: – HTTP500 Jun 7 '11 at 21:45
The special switch for Firefox is "-no-remote". Without it, calling Firefox on the remove server would just open a new window on the locally running instance. – daff Jun 7 '11 at 22:01

As mentioned in other answers, you can use X11 forwarding to accomplish this. If you are running a common Linux distribution on your client, this is as easy as connecting with the -X switch to ssh.

If you are using Windows, each client will require a different configuration to enable X forwarding (In PuTTY, it's Connection -> SSH -> X11 -> Enable X11 forwarding). You will also need an X "server" on your Windows machine (in X terminology, the program runs on the client, the graphics, keyboard and mouse are on the server). I personally recommend Xming for this, which is quite easy to set up.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.