X11 forwarding works when I am logged in my CentOS 6.6 cluster as myself (using
ssh -AY user@ipaddress). When I try switching users, e.g.
sudo su user2 and try to fire up
xterm, I get the error :
X11 connection rejected because of wrong authentication.
xterm Xt error: Can't open display: localhost:11.0
How do I get X11 forwarding to work in this case?