Most likely something in your shell startup scripts is (re)setting
$DISPLAY to the wrong value. sshd will set display numbers of 10 and up
(by default, this can be changed in sshd_config via X11DisplayOffset).