Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Issue with ssh and X11 forwarding

    Hi everybody

    I'm running Ubuntu 12.04 and installed Debian 7 into a VM (standard install - SSH server, Desktop and system utils). Successfully ssh -X from the Ubuntu to the Debian VM, however when I try to start an X11 application (ex: xclock) I get the nasty error

    connect /tmp/.X11-unix/X0: No such file or directory
    Error: Can't open display: localhost:10.0

    The "real" error is logged into /var/log/auth.log
    sshd[xxxx]: channel x: open failed: administratively prohibited: open failed

    I tried everything I could find online, but no luck

    * Host (ubuntu machine)
    xhost +

    * sshd_config ==> Added
    AllowTCPForwarding yes
    PermitOpen any
    PermitTunnel yes
    X11Forwarding yes

    * Forced ip v4
    AddressFamily inet

    * No firewall running
    Chain INPUT (policy ACCEPT)
    Chain FORWARD (policy ACCEPT)
    Chain OUTPUT (policy ACCEPT)

    * strace
    -e all on ssh and sshd

    * apparmor is not installed

    * selinux is not active, but libselinux1 is installed (cannot be removed, included in too many dependencies)

    * export DISPLAY=0:0
    no luck

    * /etc/hosts.allow has ALL:ALL

    The issue must be related to some authorization, maybe security config I cannot find.

    Any idea from anybody?

  2. #2
    Linux Engineer
    Join Date
    Jan 2005
    Saint Paul, MN
    Are you passing the "-X" option when you "ssh" such as:
    ssh -X username@hostname

    The "export DISPLAY=0:0" says that you want to connect to the machine that you are remoting into's first display on screen 0 for that display. It is not used when you whant the display returning to your local machine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts