If you are using SSH between Unix-like operating systems, you can also forward GUI applications over SSH. This is especially useful if your server doesn’t really have a user interface, but you need to check something on the fly with a web browser running on it.
This is possible because all Unix-like systems share a common GUI windowing system called X11, which is what provides the basic framework for the desktop environment: drawing and moving windows on the display device and interacting with a mouse and keyboard, etc.
This will work also on OSX, although you will need to install and start the X11 server on your Mac first.
To enable this, make sure that on the server side the lines
X11Forwarding yes X11UseForwarding yes
are present and uncommented in the SSH daemon configuration file
You might need to restart the daemon if the changes don’t take effect.
xauth program must also be installed on the server.
Once these 2 pre conditions are met, you can run the SSH client with the
option, which activates the X11 forwarding over the secure channel:
$ ssh -X user@server
And then run any GUI program on the shell on the server:
And the window will be rendered on your local machine instead.
You can also enable the forwarding on the client side by using the option on the configuration file:
Host server Hostname myserver ForwardX11 yes