Whenever I use ssh, after I type the password, xQuartz pop ups in the dock and terminal window looses focus. This happens even if there's no an X session. Why? How to prevent this behavior?
Solved by myself. XQuartz installation added a custom configuration for ssh in
etc/ssh_config. I have just removed
ForwardX11 yes and ssh won't open XQuartz anymore.