/etc/ssh/sshd_config

echo -e "X11Forwarding yes
X11DisplayOffset 10  
X11UseLocalhost yes" >> /etc/ssh/sshd_config

Restart SSH

/etc/init.d/ssh restart

Install xauth

apt-get install xauth -y

Configure xauth

touch ~/.Xauthority && xauth generate :0 . trusted
xauth add ${HOST}:0 . $(xxd -l 16 -p /dev/urandom) && exit

Run your app

ssh -X root@mymachine app