ssh -Y came late. For a long time as I recall you just let your X windows server listen on the network and any other machine could just send it windows to draw. You could just manually set the environment variable on the remote machine. That was still how stuff worked at some banks in 2004, because they were slow to adopt ssh. Wide open connections to X servers enabled both impressive hacks and impressive trolling.