How can I ssh -X from a non-macOS machine into a macOS machine and run X11 programs displaying on the non-macOS host?
0
votes
1
answer
193
views
I have a macOS machine running Catalina.
I have also have a Linux machine, running Ubuntu 20.04.
I want to ssh from the Linux machine to the Mac by a command such as
ssh -X user@macos-machine
.
When I try to do this, I get the error message
"X11 forwarding request failed on channel 0".
The ssh itself works, as I get a shell running on the Mac and displaying on the Linux, but programs like xeyes and xterm give errors like "Can't open display:" (For reference, the DISPLAY variable does not get set.)
The xeyes and xterm executables exist on the macos machine, and they work if i use XQuartz.app. That is, if I am at the console of the macOS machine, xeyes and xterm work and display on the macOS machine.
My Linux machine can successfully run ssh -X to other Linux hosts, so I think I have to do something to the macOS host.
None of the machines has X11Forward turned on (or off) explicitly in /etc/ssh/ssh_config
and I would like to avoid directly editing files in /etc
if some other, more macOS -like, solution exists.
Asked by dan
(15 rep)
Jul 9, 2023, 07:44 AM
Last activity: Jul 9, 2023, 10:14 PM
Last activity: Jul 9, 2023, 10:14 PM