3

I try connect over ssh with

 ssh -X user@host

but I get

$ xterm
xterm Xt error: Can't open display: xterm:  DISPLAY is not set

$ echo $DISPLAY
# ... nothing

In my sshd_config I have

X11Forwarding yes
X11DisplayOffset 10

EDIT

In /var/log/auth.log I get

 sshd[7396]: error: Failed to allocate internet-domain X11 display socket.
JuanPablo
  • 913
  • 3
  • 10
  • 21

5 Answers5

5

If ipv6 is causing an issue, add this to /etc/ssh/sshd_config and restart ssh.

AddressFamily inet
Sirch
  • 5,785
  • 4
  • 20
  • 36
4

I found the problem, I dont have lo, I fix the problem added to file /etc/network/interfaces the lines

auto lo
iface lo inet loopback
JuanPablo
  • 913
  • 3
  • 10
  • 21
  • After all the suggestions of "AddressFamily inet" or "install xauth" etc, this was the actual fix for me. Thanks – Coops Jan 14 '16 at 05:34
0

make sure that the xauth package is installed on BOTH machines

stew
  • 9,388
  • 1
  • 30
  • 43
0

Try exporting the display value prior to logging in, like:

export DISPLAY=localhost:0.0

Then ssh in:

ssh -Y user@host

if it's not working using

ssh -X user@host
Logic Wreck
  • 1,420
  • 9
  • 8
0

Run xhost + and then, the ssh command.

sntg
  • 1,450
  • 11
  • 15