LinuxQuestions.org
Help answer threads with 0 replies.
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 11-11-2020, 10:33 AM   #1
camerabambai
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 408

Rep: Reputation: 54
A question about X11 forwarding.


Correct me if i'm wrong.
Probably the
Code:
 ssh -X
option is the more secure compared to
Code:
ssh -Y
Because ssh -X require two type of authentication: the ssh(password, kerberos, or public key) and the x11(xauth, xhost) authentication.
When we use
Code:
ssh -Y
which is called "trusted" we trust the host and we bypass the X11 auth so we don't need to use the command xhost.
So in my opinion
Code:
ssh -X
is more safest, there is only one problem: with the latest version of ssh seems to give this problem
I did

Code:
    ssh -vvv  -X myhost
and I get those two errors

Code:
    Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Code:
 debug2: client_x11_get_proto: xauth command: /usr/bin/xauth -f /tmp/ssh-KYHfkmGN25fa/xauthfile generate :0.0 MIT-MAGIC-COOKIE-1 untrusted timeout 1260 2>/dev/null
when I try to run xauth command directly give me this error

Code:
    /usr/bin/xauth -f /tmp/ssh-KYHfkmGN25fa/xauthfile generate :0.0 MIT-MAGIC-COOKIE-1 untrusted timeout 1260 
    /usr/bin/xauth:  error in locking authority file /tmp/ssh-KYHfkmGN25fa/xauthfile
I did this (useless) workaround: editing ssh_config and enabled those lines

Code:
    Host *
        ForwardAgent yes
        ForwardX11 yes
        ForwardX11Trusted yes
ssh -X now works fine but there is only one problem
I have try to disable access

Code:
    xhost -
and running ssh -X still accept the host! So I think that
ForwardX11Trusted yes override ForwardX11 yes

After editing ssh_config

Code:
    Host *
        ForwardAgent yes
        ForwardX11 yes
        ForwardX11Trusted no
and ssh -X don't work.
So the problem is still open.
The question is: we are forced to use ssh -Y or there is a solution?
Thanks
I'm on Slackware current with the latest ssh package
 
  


Reply

Tags
ssh, x11 forwarding, x11forwarding



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
[SOLVED] /usr/bin/X11/X11/....... 10 X11 subsets & counting walter74 Linux - General 2 06-07-2015 12:36 AM
[SOLVED] X11 Forwarding-X11 Applications Works but startx Not Works gonny95 Linux - Newbie 4 07-27-2014 08:00 PM
X11 Forwarding Question Gnarg Linux - Software 3 07-06-2006 04:37 PM
xorg-x11-libs required by xorg-x11-devel darknails Fedora 1 01-13-2005 02:34 PM
Roaming X11/Xfree86, X11 proxy zapp Linux - Software 1 09-12-2003 08:06 AM

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

All times are GMT -5. The time now is 02:58 AM.

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