How to configure ssh to allow specifying a hostname/IP in DISPLAY variable?

2018-10-19 05:06:38

I have an old application I'm trying to run on CentOS6 that uses a couple machines: abc1 and abc2.

I log into abc1 and run the application, which ssh's to abc2, changes the DISPLAY variable to abc1:0.0 and runs a process that tries to open a new window on abc1. However, it fails with: cannot open display

If I just do an ssh -X abc2 or ssh -Y abc2, I can open an xterm with no issue, but the DISPLAY variable is set to something like localhost:10.0

Note that abc1 resolves correctly (I can ping abc1 from abc2)

I cannot modify the application at all, so don't have control over the DISPLAY variable it's using. However, I can modify the configuration of both abc1 and abc2. I'm on an isolated network and do not care about security.

Is there something in ssh config or something else that I can change to allow abc1:0.0 to work?