Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssh -X not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Tue Jul 26, 2016 9:54 am    Post subject: ssh -X not working Reply with quote

I have x11 forwarding enabled by default in ssh_config(client config)
when I try to ssh I get the following:
ssh root@sap-clone
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Last login: Mon Jul 25 05:53:36 2016 from 192.168.122.1

ssh -Y works like a charm, but I want to know(for the sake of knowing) why -X is not working
here's the command run with -v switch:
Authenticated to sap-clone ([192.168.122.230]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: exec
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
debug1: Sending environment.
debug1: Sending env LANG = en_US.utf8
Last login: Tue Jul 26 05:51:24 2016 from 192.168.122.1


thanks
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 521
Location: Germany

PostPosted: Wed Jul 27, 2016 7:14 am    Post subject: Reply with quote

I'm not a specialist, so don't expect a miracle :) As far as I know, when X is started the .Xauthority file is generated containing key for authentication (actually the path to the file is stored in XAUTHORITY environment variable). When you request X forwarding, the data from that file is copied to remote destination.

Seems like the error you get indicates, that ssh can not find this XAUTHORITY file with data.

You may try to run 'xauth list' to see which keys are present in the XAUTHORITY file.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Wed Jul 27, 2016 3:07 pm    Post subject: Reply with quote

Until you get xauth set up properly, you can use ssh -Y as you already found out.
To my knowledge, this is not properly documented in Gentoo, so you have to find the docs on freedesktop wiki and elsewhere.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3648
Location: Hamburg

PostPosted: Wed Jul 27, 2016 6:52 pm    Post subject: Reply with quote

I'd always prefer -Y over -X where possible.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum