Open the Terminal application on the Mac
Modify /etc/ssh_config
(Example: sudo vim /etc/ssh_config)
or
(Example: sudo vim /etc/ssh/ssh_config) if using Mac OS 10.11 El Capitan or later
by adding:
ForwardX11 yes
(be sure to remove the # in front of this line if it is there)
Other possible lines to add:
ForwardX11Timeout 8h
ForwardX11Trusted yes
(only use this if you are using ssh only to VUIIS machines)
Then run:
sudo defaults write org.x.X11 app_to_run /usr/bin/true
Now when you ssh into a linux machine from the Terminal application on the Mac, X11 forwarding is set up, so that when you type a command that executes an X11 application (like xterm or xeyes or matlab) the graphic application will pop up in a separate window.
Note: Use your own password when asked for a password while using the sudo command.