LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-11-2016, 03:03 AM   #1
isnurmi
LQ Newbie
 
Registered: Jul 2016
Posts: 2

Rep: Reputation: Disabled
Unhappy no xauth data for X-session with a remote machine


I keep getting

Warning: No xauth data; using fake authentication data for X11 forwarding.

when ssh-ing from the ArchLinux machine to the remote X-server. Looks like it does not like .Xauthority file at my place, is it true ? If so how I can fix it ? No 'xauth' command in this distro

Thanks anyone who helps
 
Old 07-22-2016, 07:10 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by isnurmi View Post
Warning: No xauth data; using fake authentication data for X11 forwarding.
when ssh-ing from the ArchLinux machine to the remote X-server. Looks like it does not like .Xauthority file at my place, is it true ? If so how I can fix it ? No 'xauth' command in this distro
First, terminology - the remote machine (the 'server') is running X client applications, it is your local machine which supplies the X server. The remote machine doesn't need an X server to be installed at all in order to run X applications.

Normally the authority cookie is so that X client applications can be authenticated on connection with the X server. On the local machine, this is easy, because the Xauthority file contains the cookie generated by the X server, and connections are made directly with the server.

However, on a remote machine via ssh, the X connection is being forwarded by sshd. In order to prevent arbitrary remote applications connecting to the forwarder, an authorization key on the remote machine is used. This is a 'fake' key in the sense that it was not generated by the X server. The remote X client application is not being authorized at the X server on the local machine using that key, it is only being authorized by the sshd forwarder.

This means that there isn't end-to-end authorization, so sshd is just warning you of that. Finding a method to remove that warning is going to mean that you are removing even the remote authorization, and opening up a larger security issue.
 
Old 07-22-2016, 11:59 AM   #3
isnurmi
LQ Newbie
 
Registered: Jul 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Great, thanks, neonsignal, for the clarification.
 
Old 07-28-2016, 08:06 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
The problem may be a missing xauth utility (or it isn't in the expected location).

The .Xauthority file can be placed anywhere you have write access to. This is because when sshd receives a connection it uses the xauth utility to store a generated authorization key (normally, a non-privileged key, so that things like xhost+ won't work remotely, and remote screen lock doesn't work).

Normally the path is specified in the sshd_config file on the sshd server (XAuthLocation).

You can also TRY to set the xauthority location using ~/.ssh/environment file (see ssh manpage). The authority file is identified by the environment variable XAUTHORITY (see manpage on xauth). The default is supposed to be the users home directory ($HOME/.Xauthority), but some distributions change that (or a site will change it) to point to a tmpfs filesystem belonging to the user, that is dismounted when the user logs out (automatic deletion of various files).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
couldn't get data through snmp from remote machine icy1900 Linux - Server 2 06-24-2014 01:46 AM
data shift from 1 remote machine to another remote machine raheelch General 7 03-09-2010 08:44 AM
Warning: No xauth data; using fake authentication data for X11 forwarding. hepburnenthorpe Linux - Desktop 1 04-18-2009 09:17 PM
closing SSH session without killing the SFTP transfer on the remote machine stevec Linux - Software 2 04-20-2006 05:13 PM
Is there a fast way to view (not manipulate) an X session on a remote machine? auditek747 Linux - Software 4 03-18-2006 11:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration