The command ssh -X or ssh -Y to a remote Linux machine from a Mac produces an error similar to one of these:
ssh -X
ssh -Y
Update XQuartz to the latest available version.
XQuartz is old and needs to be updated.