SSH the server has a feature called X11Forwarding. It specifies whether X11 forwarding is permitted or not. You need to set this parameter to yes. Once this is enabled, you will be able to run a graphical application on the server and get the application display (window) on your desktop.
For example, login on Linux/BSD system called server1-mydomain-com. Open the /etc/ssh/sshd_config file using text editor:
vi /etc/ssh/sshd_config
Find out parameter X11Forwarding and set it to yes:
In all, the SSH connection requires two key pairs –
Your Client software checks the Server’s (host) public key against data the server sends encrypted with the host private key. This requires you to have a copy of its public key, which you’re handed at the first connection and your client stores if you approve of it.
The Server checks your authentication data encrypted with your user private key using the copy of your user public key that it has a copy of because you put it there (or had someone put there for you).
By adding the «-Y» flag to the ssh command, the display will automatically be redirected to your local computer.
ssh -Y <remoteip>
Then, if you start Firefox (or any other X application) in that ssh session, it will be displayed locally. (If you have a xserver running locally of course)