View previous topic :: View next topic |
Author |
Message |
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Tue Jul 26, 2016 9:54 am Post subject: ssh -X not working |
|
|
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 |
|
|
v_andal Guru
Joined: 26 Aug 2008 Posts: 541 Location: Germany
|
Posted: Wed Jul 27, 2016 7:14 am Post subject: |
|
|
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 |
|
|
chithanh Developer
Joined: 05 Aug 2006 Posts: 2158 Location: Berlin, Germany
|
Posted: Wed Jul 27, 2016 3:07 pm Post subject: |
|
|
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 |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Wed Jul 27, 2016 6:52 pm Post subject: |
|
|
I'd always prefer -Y over -X where possible. |
|
Back to top |
|
|
|