1

I would like to ssh to a docker image with X11 forwarding.

When I connect using SSH -X -v and execute xclock, it seems like the application runs (it does not terminates), but no window is opened.

My /etc/ssh/sshd_config includes

X11Forwarding yes                                                                                                           
X11UseLocalhost no  
X11DisplayOffset 10                                                                                                         
AllowAgentForwarding yes                                                                                                    

xauth is installed on docker image.

No error is reported after the print of

debug1: Requesting X11 forwarding with authentication spoofing.

The result of echo $DISPLAY is <<HOSTNAME>>:11.0

I also tried ssh -Y instead of -X with no luck

3
  • Was using sequence number 11 (and not 10) intentional? I think that SSH uses that number to map a display to a port.. I have to wonder if it simply doesn't know where to export the display to. Oct 17, 2021 at 13:28
  • I think it happens because I tried to connect twice. On the first attempt the display number was 10. Oct 17, 2021 at 14:02
  • Did you ever figure this out?
    – Jason C
    Dec 21, 2023 at 23:07

0

You must log in to answer this question.

Browse other questions tagged .