In Debian, type
$ sudo apt-get install xserver-xephyr
To run Xephyr on your local machine and receive remote X client connections to your local Xephyr window, do the following.
local-machine:$ (echo -n "add :1 . "; mcookie) | xauth local-machine:$ Xephyr :1 -reset -terminate & local-machine:$ DISPLAY=:1 ssh -Y username@remotemachine gnome-session
To run Xephyr on the remote machine and forward the Xephyr window to your local machine, do the following.
local-machine:$ ssh -X username@remotemachine remotemachine:$ (echo -n "add :1 . "; mcookie) | xauth remotemachine:$ Xephyr :1 -reset -terminate & remotemachine:$ export DISPLAY=:1 remotemachine:$ gnome-session
ssh -X username@remotemachine "(echo -n 'add :1 . '; mcookie) | xauth; Xephyr :1 -reset -terminate & DISPLAY=:1 gnome-session"
Unfortunately, this requires you to trust the user account on the remote machine (because it can start other programs to interact with your local X session, and could do keylogging).
This method also seems slower to update the screen and uses much more (more than twice as much?) bandwidth than Method 1.