I have to enable debugging by using "-vvv" from SSH client to understand the problem:
ssh -vvv -X user@remote.com
The log contained:
debug1: No xauth program.
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
ssh -vvv -XY user@remote.com
This time, it contained:
debug1: No xauth program.
Warning: No xauth data; using fake authentication data for X11 forwarding.
The problem must be related to xauth and I can't find this anywhere on Sierra. Googling the web, the link below came to my attention:
https://origin-discussions-us.apple.com/thread/7685786?start=0&tstart=0
So, I the solution here is to install XQuartz as this comes with the xauth binary.
After the installation, Sierra SSH configuration files /etc/ssh/sshd_config and etc/ssh/ssh_config both contains:
XAuthLocation /opt/X11/bin/xauth
Another attempt with the following command shows Firefox running remote on Ubuntu and displayed locally:
ssh -XY user@remote.com firefox
To improve local connection speed, you could request compression by adding "-C" when executing SSH:
ssh -XYC user@remote.com firefox