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?
user2
does not have permissions to write touser
socket, which is correct. You might change permissions on such sockets, but then you might open security hole to your workstation.