pantz.org banner
OpenSSH not finding xauth causing X sessions to fail
Posted on 05-17-2007 02:47:00 UTC | Updated on 05-17-2007 02:47:00 UTC
Section: /software/ssh/ | Permanent Link

I SSH'ed into a machine and used -X to turn on X forwarding. Then tried to start a simple xterm. I got the message

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

I know the SSHd forwarding is turned on but this made no sense. So I used the ever so helpful -vvv debuging feature built in to OpenSSH. So you ssh like the following command.

ssh -Xvvv username@hostname

This procedes to tell me in the last few lines

debug1: Remote: No xauth program; cannot forward with spoofing.". The above the line "debug2: x11_get_proto: /usr/bin/X11/xauth list :0.0 2>/dev/null

This shows it looking for xauth in /usr/bin/X11/xauth. It's not there so I make a symbolic link it there (restart sshd), login again and still no go. My xauth lives in /usr/bin/xauth. Then I tried using configuration setting "xauthlocation /usr/bin/xauth" in the sshd_config file and restarting sshd. That did not work either. So I do decide to see where sshd thinks xauth lives. I check this with the strings command.

strings sshd | grep xauth

That gave me the following:

/usr/X11R6/bin/xauth.

So I make a symbolic link from /usr/bin/xauth to /usr/X11R6/bin/xauth and it worked perfectly. The one thing I do need to say is that this SSH version was compiled by someone and was not part of a distro. So it seems it had it's own default places it looked for things.

Reddit!

Related stories


RSS Feed RSS feed logo

About


3com

3ware

alsa

alsactl

alsamixer

amd

android

apache

areca

arm

ati

auditd

awk

badblocks

bash

bind

bios

bonnie

cable

carp

cat5

cdrom

cellphone

centos

chart

chrome

chromebook

cifs

cisco

cloudera

comcast

commands

comodo

compiz-fusion

corsair

cpufreq

cpufrequtils

cpuspeed

cron

crontab

crossover

cu

cups

cvs

database

dbus

dd

dd_rescue

ddclient

debian

decimal

dhclient

dhcp

diagnostic

diskexplorer

disks

dkim

dns

dos

dovecot

drac

dsniff

dvdauthor

e-mail

echo

editor

emerald

encryption

ethernet

expect

ext3

ext4

fat32

fedora

fetchmail

fiber

filesystems

firefox

firewall

flac

flexlm

floppy

flowtools

fonts

format

freebsd

ftp

gdm

gmail

gnome

google

gpg

greasemonkey

greylisting

growisofs

grub

hacking

hadoop

harddrive

hba

hex

hfsc

html

html5

http

https

hulu

idl

ie

ilo

intel

ios

iperf

ipmi

iptables

ipv6

irix

javascript

kde

kernel

kickstart

kmail

kprinter

krecord

kubuntu

kvm

lame

ldap

linux

logfile

lp

lpq

lpr

maradns

matlab

memory

mencoder

mhdd

mkinitrd

mkisofs

moinmoin

motherboard

mouse

movemail

mplayer

multitail

mutt

myodbc

mysql

mythtv

nagios

nameserver

netflix

netflow

nginx

nic

ntfs

ntp

nvidia

odbc

openbsd

openntpd

openoffice

openssh

openssl

openvpn

opteron

parted

partimage

patch

perl

pf

pfflowd

pfsync

photorec

php

pop3

pop3s

ports

postfix

power

procmail

proftpd

proxy

pulseaudio

putty

pxe

python

qemu

r-studio

raid

recovery

redhat

router

rpc

rsync

ruby

saltstack

samba

schedule

screen

scsi

seagate

seatools

sed

sendmail

sgi

shell

siw

smtp

snort

solaris

soundcard

sox

spam

spamd

spf

spotify

sql

sqlite

squid

srs

ssh

ssh.com

ssl

su

subnet

subversion

sudo

sun

supermicro

switches

symbols

syslinux

syslog

systemd

systemrescuecd

t1

tcpip

tcpwrappers

telnet

terminal

testdisk

tftp

thttpd

thunderbird

timezone

ting

tls

tools

tr

trac

tuning

tunnel

ubuntu

unbound

vi

vpn

wget

wiki

windows

windowsxp

wireless

wpa_supplicant

x

xauth

xfree86

xfs

xinearama

xmms

youtube

zdump

zeromq

zic

zlib