Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.
share|improve this question
    
What is the output of $ echo $DISPLAY –  AndresSM Jun 20 '12 at 16:37
    
Is an X server running on your source? Before you ssh anywhere else, echo $DISPLAY –  Sirch Jun 20 '12 at 16:42
    
@Andres with echo $DISPLAY I get nothing –  JuanPablo Jun 20 '12 at 16:55
add comment

5 Answers

up vote 1 down vote accepted

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
share|improve this answer
add comment

make sure that the xauth package is installed on BOTH machines

share|improve this answer
    
yes, xauth is installed in both machines –  JuanPablo Jun 20 '12 at 14:47
add comment

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

AddressFamily inet
share|improve this answer
    
I try add AddressFamily inet and restart sshd but get the same, and try ssh -4 to force ipv4, but nothing –  JuanPablo Jun 20 '12 at 16:30
add comment

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
share|improve this answer
add comment

Run xhost + and then, the ssh command.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.