How can I prevent the warning No xauth data; using fake authentication data for X11 forwarding?How can I enable X11 forwarding to a Debian server box?How to enable SSH X11 forwarding through additional server?How can I start an X11 session on my headless Fedora 13 server?What does “Warning: untrusted X11 forwarding setup failed: xauth key data not generated” mean when ssh'ing with -X?How to configure D-Bus and SSH X-Forwarding to prevent SSH from hanging on exit?OpenSSH disable ControlMaster for given hostnameHow do you configure X11 forwarding over SSH on AIX?How do diagnose laggy X11 applications running via ssh forwarding?X11 Forwarding: GUI appears in the remote server instead of clientHow to enable SSH X11 forwarding through docker container which is located in a remote server?
Is there an idiom that means "revealing a secret unintentionally"?
The unknown and unexplained in science fiction
Creating Stored Procedure in local db that references tables in linked server
Is it possible to do moon sighting in advance for 5 years with 100% accuracy?
My Sixteen Friendly Students
Examples where existence is harder than evaluation
What's the difference between "ricochet" and "bounce"?
Why does this pattern in powers happen?
How is it believable that Euron could so easily pull off this ambush?
I'm attempting to understand my 401k match and how much I need to contribute to maximize the match
Do these creatures from the Tomb of Annihilation campaign speak Common?
Is it safe to keep the GPU on 100% utilization for a very long time?
Align a table column at a specific symbol
get unsigned long long addition carry
Visualize multiple string segments
Wiper fluid only squirts out for a second - Hyundai Accent 2006
Mindfulness of Watching Youtube
Whose birthyears are canonically established in the MCU?
Why are thrust reversers not used down to taxi speeds?
Names of the Six Tastes
What are my options legally if NYC company is not paying salary?
How would an instant or sorcery with an effect that targets work with Feather?
What happens when the drag force exceeds the weight of an object falling into earth?
Can a character shove an enemy who is already prone?
How can I prevent the warning No xauth data; using fake authentication data for X11 forwarding?
How can I enable X11 forwarding to a Debian server box?How to enable SSH X11 forwarding through additional server?How can I start an X11 session on my headless Fedora 13 server?What does “Warning: untrusted X11 forwarding setup failed: xauth key data not generated” mean when ssh'ing with -X?How to configure D-Bus and SSH X-Forwarding to prevent SSH from hanging on exit?OpenSSH disable ControlMaster for given hostnameHow do you configure X11 forwarding over SSH on AIX?How do diagnose laggy X11 applications running via ssh forwarding?X11 Forwarding: GUI appears in the remote server instead of clientHow to enable SSH X11 forwarding through docker container which is located in a remote server?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Every time I initiate an ssh connection from my Mac to a Linux (Debian) I do get this warning:
No xauth data; using fake authentication data for X11 forwarding.
This also happens for tools that are using ssh, like git or mercurial.
I just want to make a local change to my system in order to prevent this from appearing.
Note: I do have X11 server (XQuartz 2.7.3 (xorg-server 1.12.4)) on my Mac OS X (10.8.1) and it is working properly, I can successfully start clock locally or remotely.
ssh x11
add a comment |
Every time I initiate an ssh connection from my Mac to a Linux (Debian) I do get this warning:
No xauth data; using fake authentication data for X11 forwarding.
This also happens for tools that are using ssh, like git or mercurial.
I just want to make a local change to my system in order to prevent this from appearing.
Note: I do have X11 server (XQuartz 2.7.3 (xorg-server 1.12.4)) on my Mac OS X (10.8.1) and it is working properly, I can successfully start clock locally or remotely.
ssh x11
1
What command are you using to ssh?
– DerfK
Aug 30 '12 at 14:43
@DerfK justssh hostnamebut in my~/.ssh/configI addedForwardX11 yessome time ago. Still this is something that I do want to have there.
– sorin
Aug 30 '12 at 14:45
Using Ubuntu 16.04 LTS (August 2017) I give up. Bottom line is that even though it gives the error, it works. I usessh -Y hostnamefrom Linux, andssh -x hostnamewhen using OpenSSH on Windows.
– SDsolar
Aug 31 '17 at 5:55
add a comment |
Every time I initiate an ssh connection from my Mac to a Linux (Debian) I do get this warning:
No xauth data; using fake authentication data for X11 forwarding.
This also happens for tools that are using ssh, like git or mercurial.
I just want to make a local change to my system in order to prevent this from appearing.
Note: I do have X11 server (XQuartz 2.7.3 (xorg-server 1.12.4)) on my Mac OS X (10.8.1) and it is working properly, I can successfully start clock locally or remotely.
ssh x11
Every time I initiate an ssh connection from my Mac to a Linux (Debian) I do get this warning:
No xauth data; using fake authentication data for X11 forwarding.
This also happens for tools that are using ssh, like git or mercurial.
I just want to make a local change to my system in order to prevent this from appearing.
Note: I do have X11 server (XQuartz 2.7.3 (xorg-server 1.12.4)) on my Mac OS X (10.8.1) and it is working properly, I can successfully start clock locally or remotely.
ssh x11
ssh x11
asked Aug 30 '12 at 14:42
sorinsorin
3,492205384
3,492205384
1
What command are you using to ssh?
– DerfK
Aug 30 '12 at 14:43
@DerfK justssh hostnamebut in my~/.ssh/configI addedForwardX11 yessome time ago. Still this is something that I do want to have there.
– sorin
Aug 30 '12 at 14:45
Using Ubuntu 16.04 LTS (August 2017) I give up. Bottom line is that even though it gives the error, it works. I usessh -Y hostnamefrom Linux, andssh -x hostnamewhen using OpenSSH on Windows.
– SDsolar
Aug 31 '17 at 5:55
add a comment |
1
What command are you using to ssh?
– DerfK
Aug 30 '12 at 14:43
@DerfK justssh hostnamebut in my~/.ssh/configI addedForwardX11 yessome time ago. Still this is something that I do want to have there.
– sorin
Aug 30 '12 at 14:45
Using Ubuntu 16.04 LTS (August 2017) I give up. Bottom line is that even though it gives the error, it works. I usessh -Y hostnamefrom Linux, andssh -x hostnamewhen using OpenSSH on Windows.
– SDsolar
Aug 31 '17 at 5:55
1
1
What command are you using to ssh?
– DerfK
Aug 30 '12 at 14:43
What command are you using to ssh?
– DerfK
Aug 30 '12 at 14:43
@DerfK just
ssh hostname but in my ~/.ssh/config I added ForwardX11 yes some time ago. Still this is something that I do want to have there.– sorin
Aug 30 '12 at 14:45
@DerfK just
ssh hostname but in my ~/.ssh/config I added ForwardX11 yes some time ago. Still this is something that I do want to have there.– sorin
Aug 30 '12 at 14:45
Using Ubuntu 16.04 LTS (August 2017) I give up. Bottom line is that even though it gives the error, it works. I use
ssh -Y hostname from Linux, and ssh -x hostname when using OpenSSH on Windows.– SDsolar
Aug 31 '17 at 5:55
Using Ubuntu 16.04 LTS (August 2017) I give up. Bottom line is that even though it gives the error, it works. I use
ssh -Y hostname from Linux, and ssh -x hostname when using OpenSSH on Windows.– SDsolar
Aug 31 '17 at 5:55
add a comment |
9 Answers
9
active
oldest
votes
None of the posted solutions worked for me. My client (desktop) system is running macOS 10.12.5 (Sierra). I added -v to the options for the ssh command and it told me,
debug1: No xauth program.
which means it doesn't have a correct path to the xauth program. (On this version of macOS the path to xauth is nonstandard.) The solution was to add this line to /etc/ssh/ssh_config (may be /etc/ssh/config in some setups) or in ~/.ssh/config (if you don't have admin rights):
XAuthLocation /opt/X11/bin/xauth
Now the warning message is gone.
10
OMG. Years I’ve been trying to find a solution, and this worked. Years I say! Note that I did this by adding that line under theHost *entry in my~/.ssh/configfile instead of editing/etc/ssh/ssh_config. The only documentation I found for this was inman sshd_config.
– Demitri
Jul 10 '17 at 6:07
This worked for me as well. I understand that at the moment XQuartz is not being well maintained due to lack of funding. So I think porting issues like this are actually fewer than I would expect.
– AlanObject
Jul 23 '17 at 17:09
Finally worked!!!
– thuzhf
Sep 29 '17 at 14:57
On High Sierra; this is the one that worked for me too.
– mklein9
Mar 10 '18 at 23:52
1
Note you may experience this issue even when your shell can find xauth in your PATH! I guess the ssh client is sanitizing your PATH for security reasons?
– MarcH
May 24 '18 at 15:55
|
show 1 more comment
Found the cause, my ~/.ssh/config was incomplete, you need both:
Host *
ForwardAgent yes
ForwardX11 yes
My mistake was that I included only the ForwardX11 option.
12
I'm not sure why this is needed/relevant.ForwardAgentis used to allow keys cached inssh-agentto pass through multiple nested SSH connections. It should not have any relevance to X11. And fwiw, according to some, it's not a good idea security-wise: heipei.github.io/2015/02/26/…
– underscore_d
Sep 24 '15 at 21:08
2
That does not sound right, what helps is to actually turn off X11 forwarding or fix the xauth configuration to set it up. It is not related to ssh agents.
– eckes
Sep 22 '17 at 6:42
This solution did not work for me.
– David M. Karr
Jan 24 at 21:23
add a comment |
As noted, it seems that xauth on OS X Yosemite has regressed to an old version that doesn't work with XQuartz's $DISPLAY setting:
% xauth -V
1.0.9
% xauth generate $DISPLAY .
xauth: (argv):1: bad display name "/private/tmp/com.apple.launchd(...)/org.macosforge.xquartz:0" in "add" command
1
I tested the same lines on OS X 10.11, and I do not get any error. Still same version of XQuartz.
– sorin
Mar 1 '16 at 11:48
@guest Yourxauth generate $DISPLAY .command worked on my Mac OS X High Sierra (10.13), and it solved myNo xauth data; using fake authentication data for X11 forwarding.pb.
– SebMa
Aug 10 '18 at 16:13
add a comment |
Letting Ubuntu bash on Windows 10 run ssh -X to get a GUI environment on a remote server
- First
Install all the following. On Window, install Xming. On Ubuntu bash, use sudo apt install to install ssh xauth xorg.
sudo apt install ssh xauth xorg
- Second
Go to the folder contains ssh_config file, mine is /etc/ssh.
- Third
Edit ssh_config as administrator(USE sudo). Inside ssh_config, remove the hash # in the lines ForwardAgent, ForwardX11, ForwardX11Trusted, and set the corresponding arguments to yes.
# /etc/ssh/ssh_config
Host *
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
- Forth
In ssh_config file, remove the front hash # before Port 22 and Protocol 2, and also append a new line at the end of the file to state the xauth file location, XauthLocation /usr/bin/xauth, remember write your own path of xauth file.
# /etc/ssh/ssh_config
# IdentifyFile ...
Port 22
Protocol 2
# Cipher 3des
# ...
# ...
...
...
GSSAPIDelegateCredentials no
XauthLocation /usr/bin/xauth
- Fifth
Now since we are done editing ssh_config file, save it when we leave the editor. Now go to folder ~ or $HOME, append export DISPLAY=localhost:0 to your .bashrc file and save it.
# ~/.bashrc
...
...
export DISPLAY=localhost:0
- Last
We are almost done. Restart your bash shell, open your Xming program and use ssh -X yourusername@yourhost. Then enjoy the GUI environment.
ssh -X yourusername@yourhost
The problem is also in Ubuntu subsystem on Windows, and the link is at
https://gist.github.com/DestinyOne/f236f71b9cdecd349507dfe90ebae776
Note: the linked text includes 2 typos (XauthLocaion instead of XauthLocation)
The question isn't about Windows.
– kasperd
Sep 22 '17 at 7:53
On MacOS it is almost the same, the differences are instead ofXming, we should getXQuartz, and thessh_configfile is in a different location, mine is/private/etc/ssh.
– DestinyOne
Sep 22 '17 at 15:45
And also, the last line forssh_configwill be:XAuthLocation /opt/X11/bin/xauth
– DestinyOne
Sep 22 '17 at 15:58
2
Edit needed:XauthLocaion->XauthLocation(that edit is too small for me to make).
– echristopherson
Mar 3 '18 at 4:05
Besides installingxming,ssh,xauth, andxorg(step 1), the only thing needed for me wasexport DISPLAY=localhost:0
– Eponymous
Mar 8 '18 at 3:35
|
show 1 more comment
There is a bug in MacOS at the moment. I came across this too. The fix for me involved adding the following to my .bash_profile
dispdir=`dirname $DISPLAY`
dispfile=`basename $DISPLAY`
dispnew="$dispdir/:0"
if [ -e $DISPLAY -a "$dispfile" = "org.x:0" ]; then
mv $DISPLAY $dispnew
fi
export DISPLAY=$dispnew
Essentially the name for the file pipe associated with your X root can't be handled correctly, and thus needs correction. :-)
I doubt this would solve the error in GUI OS X apps, like SourceTree.
– sorin
Mar 1 '16 at 11:49
Confirming it does work on Sierra for running emacs using X - as the Mac is the server. this should work broadly in cases where the client is on a remote machine
– Mark Mullin
Dec 18 '16 at 16:24
add a comment |
Including
XAuthLocation /opt/local/bin/xauth
in ~/.ssh/config
in my macOS Sierra 10.12.6 worked for me. A small change from answer 7).
add a comment |
i just removed ~/.Xauthority (destination machine) from my root folder and ssh -X 192.168.123.1 again and ik worked.
I can confirm this is an answer on Mac OS Sierra 10.12.4. Removing ~/.Xauthority on SSH server does the trick:~$ mv ~/.Xauthority ~/.Xauthority.bakA new magic cookie was automatically put back in ~/.Xauthority once I logged in again. No Bash scripting is required at all.
– Kenneth Pegasus
May 31 '17 at 23:45
add a comment |
In my case it was the problem of .Xauthority containing the Magic cookie
not forwarded, Fabby on http://askubuntu.com/questions/571116/ recommends
on 2014-11-14 to add this line at the end of the .bashrc or . profile
to allow forwarding of xauth keys between users when calling su:
export $(dbus-launch)
I added also previously:
export XAUTHORITY=~/.Xauthority
to ensure remote called with ssh -X ̍@ will find it.
In my case .Xauthority is a symlink to original user /home//.Xauthority I su from...
cd /home/<child_user>;ln -sf /home/<parent_user>/.Xauthority .xAuthority
with correct rights:
sudo chown <parent_user> /home/<parent_user>/.profile
chmod a+rw /home/<parent_user>/.profile
so it is accessible to and to . will be able to trigger apps on and display X-windowed result on its local screen throughout proxy account !
TIP : Check xauth list...if reflects magic cookie on .
add a comment |
I would add this as a comment, but I don't have enough rep. Adding one more line to sorin's solution worked for me.
Open your ssh config file with vim ~/.ssh/config
Then add these lines to it:
Host *
ForwardAgent yes
ForwardX11 yes
XAuthLocation /opt/X11/bin/xauth
You can double check your xauth location with:
which xauth
Not sure if this would really work because xauth location would be different on each remote machine. Yours looks like a MacOS one, but Linux has it in different location. I mostly started to disable ForwardX11 completly because I almost never user it.
– sorin
Feb 23 at 8:23
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f422908%2fhow-can-i-prevent-the-warning-no-xauth-data-using-fake-authentication-data-for%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
None of the posted solutions worked for me. My client (desktop) system is running macOS 10.12.5 (Sierra). I added -v to the options for the ssh command and it told me,
debug1: No xauth program.
which means it doesn't have a correct path to the xauth program. (On this version of macOS the path to xauth is nonstandard.) The solution was to add this line to /etc/ssh/ssh_config (may be /etc/ssh/config in some setups) or in ~/.ssh/config (if you don't have admin rights):
XAuthLocation /opt/X11/bin/xauth
Now the warning message is gone.
10
OMG. Years I’ve been trying to find a solution, and this worked. Years I say! Note that I did this by adding that line under theHost *entry in my~/.ssh/configfile instead of editing/etc/ssh/ssh_config. The only documentation I found for this was inman sshd_config.
– Demitri
Jul 10 '17 at 6:07
This worked for me as well. I understand that at the moment XQuartz is not being well maintained due to lack of funding. So I think porting issues like this are actually fewer than I would expect.
– AlanObject
Jul 23 '17 at 17:09
Finally worked!!!
– thuzhf
Sep 29 '17 at 14:57
On High Sierra; this is the one that worked for me too.
– mklein9
Mar 10 '18 at 23:52
1
Note you may experience this issue even when your shell can find xauth in your PATH! I guess the ssh client is sanitizing your PATH for security reasons?
– MarcH
May 24 '18 at 15:55
|
show 1 more comment
None of the posted solutions worked for me. My client (desktop) system is running macOS 10.12.5 (Sierra). I added -v to the options for the ssh command and it told me,
debug1: No xauth program.
which means it doesn't have a correct path to the xauth program. (On this version of macOS the path to xauth is nonstandard.) The solution was to add this line to /etc/ssh/ssh_config (may be /etc/ssh/config in some setups) or in ~/.ssh/config (if you don't have admin rights):
XAuthLocation /opt/X11/bin/xauth
Now the warning message is gone.
10
OMG. Years I’ve been trying to find a solution, and this worked. Years I say! Note that I did this by adding that line under theHost *entry in my~/.ssh/configfile instead of editing/etc/ssh/ssh_config. The only documentation I found for this was inman sshd_config.
– Demitri
Jul 10 '17 at 6:07
This worked for me as well. I understand that at the moment XQuartz is not being well maintained due to lack of funding. So I think porting issues like this are actually fewer than I would expect.
– AlanObject
Jul 23 '17 at 17:09
Finally worked!!!
– thuzhf
Sep 29 '17 at 14:57
On High Sierra; this is the one that worked for me too.
– mklein9
Mar 10 '18 at 23:52
1
Note you may experience this issue even when your shell can find xauth in your PATH! I guess the ssh client is sanitizing your PATH for security reasons?
– MarcH
May 24 '18 at 15:55
|
show 1 more comment
None of the posted solutions worked for me. My client (desktop) system is running macOS 10.12.5 (Sierra). I added -v to the options for the ssh command and it told me,
debug1: No xauth program.
which means it doesn't have a correct path to the xauth program. (On this version of macOS the path to xauth is nonstandard.) The solution was to add this line to /etc/ssh/ssh_config (may be /etc/ssh/config in some setups) or in ~/.ssh/config (if you don't have admin rights):
XAuthLocation /opt/X11/bin/xauth
Now the warning message is gone.
None of the posted solutions worked for me. My client (desktop) system is running macOS 10.12.5 (Sierra). I added -v to the options for the ssh command and it told me,
debug1: No xauth program.
which means it doesn't have a correct path to the xauth program. (On this version of macOS the path to xauth is nonstandard.) The solution was to add this line to /etc/ssh/ssh_config (may be /etc/ssh/config in some setups) or in ~/.ssh/config (if you don't have admin rights):
XAuthLocation /opt/X11/bin/xauth
Now the warning message is gone.
edited Aug 11 '18 at 3:20
SebMa
1617
1617
answered Jul 4 '17 at 22:19
nmgeeknmgeek
671134
671134
10
OMG. Years I’ve been trying to find a solution, and this worked. Years I say! Note that I did this by adding that line under theHost *entry in my~/.ssh/configfile instead of editing/etc/ssh/ssh_config. The only documentation I found for this was inman sshd_config.
– Demitri
Jul 10 '17 at 6:07
This worked for me as well. I understand that at the moment XQuartz is not being well maintained due to lack of funding. So I think porting issues like this are actually fewer than I would expect.
– AlanObject
Jul 23 '17 at 17:09
Finally worked!!!
– thuzhf
Sep 29 '17 at 14:57
On High Sierra; this is the one that worked for me too.
– mklein9
Mar 10 '18 at 23:52
1
Note you may experience this issue even when your shell can find xauth in your PATH! I guess the ssh client is sanitizing your PATH for security reasons?
– MarcH
May 24 '18 at 15:55
|
show 1 more comment
10
OMG. Years I’ve been trying to find a solution, and this worked. Years I say! Note that I did this by adding that line under theHost *entry in my~/.ssh/configfile instead of editing/etc/ssh/ssh_config. The only documentation I found for this was inman sshd_config.
– Demitri
Jul 10 '17 at 6:07
This worked for me as well. I understand that at the moment XQuartz is not being well maintained due to lack of funding. So I think porting issues like this are actually fewer than I would expect.
– AlanObject
Jul 23 '17 at 17:09
Finally worked!!!
– thuzhf
Sep 29 '17 at 14:57
On High Sierra; this is the one that worked for me too.
– mklein9
Mar 10 '18 at 23:52
1
Note you may experience this issue even when your shell can find xauth in your PATH! I guess the ssh client is sanitizing your PATH for security reasons?
– MarcH
May 24 '18 at 15:55
10
10
OMG. Years I’ve been trying to find a solution, and this worked. Years I say! Note that I did this by adding that line under the
Host * entry in my ~/.ssh/config file instead of editing /etc/ssh/ssh_config. The only documentation I found for this was in man sshd_config.– Demitri
Jul 10 '17 at 6:07
OMG. Years I’ve been trying to find a solution, and this worked. Years I say! Note that I did this by adding that line under the
Host * entry in my ~/.ssh/config file instead of editing /etc/ssh/ssh_config. The only documentation I found for this was in man sshd_config.– Demitri
Jul 10 '17 at 6:07
This worked for me as well. I understand that at the moment XQuartz is not being well maintained due to lack of funding. So I think porting issues like this are actually fewer than I would expect.
– AlanObject
Jul 23 '17 at 17:09
This worked for me as well. I understand that at the moment XQuartz is not being well maintained due to lack of funding. So I think porting issues like this are actually fewer than I would expect.
– AlanObject
Jul 23 '17 at 17:09
Finally worked!!!
– thuzhf
Sep 29 '17 at 14:57
Finally worked!!!
– thuzhf
Sep 29 '17 at 14:57
On High Sierra; this is the one that worked for me too.
– mklein9
Mar 10 '18 at 23:52
On High Sierra; this is the one that worked for me too.
– mklein9
Mar 10 '18 at 23:52
1
1
Note you may experience this issue even when your shell can find xauth in your PATH! I guess the ssh client is sanitizing your PATH for security reasons?
– MarcH
May 24 '18 at 15:55
Note you may experience this issue even when your shell can find xauth in your PATH! I guess the ssh client is sanitizing your PATH for security reasons?
– MarcH
May 24 '18 at 15:55
|
show 1 more comment
Found the cause, my ~/.ssh/config was incomplete, you need both:
Host *
ForwardAgent yes
ForwardX11 yes
My mistake was that I included only the ForwardX11 option.
12
I'm not sure why this is needed/relevant.ForwardAgentis used to allow keys cached inssh-agentto pass through multiple nested SSH connections. It should not have any relevance to X11. And fwiw, according to some, it's not a good idea security-wise: heipei.github.io/2015/02/26/…
– underscore_d
Sep 24 '15 at 21:08
2
That does not sound right, what helps is to actually turn off X11 forwarding or fix the xauth configuration to set it up. It is not related to ssh agents.
– eckes
Sep 22 '17 at 6:42
This solution did not work for me.
– David M. Karr
Jan 24 at 21:23
add a comment |
Found the cause, my ~/.ssh/config was incomplete, you need both:
Host *
ForwardAgent yes
ForwardX11 yes
My mistake was that I included only the ForwardX11 option.
12
I'm not sure why this is needed/relevant.ForwardAgentis used to allow keys cached inssh-agentto pass through multiple nested SSH connections. It should not have any relevance to X11. And fwiw, according to some, it's not a good idea security-wise: heipei.github.io/2015/02/26/…
– underscore_d
Sep 24 '15 at 21:08
2
That does not sound right, what helps is to actually turn off X11 forwarding or fix the xauth configuration to set it up. It is not related to ssh agents.
– eckes
Sep 22 '17 at 6:42
This solution did not work for me.
– David M. Karr
Jan 24 at 21:23
add a comment |
Found the cause, my ~/.ssh/config was incomplete, you need both:
Host *
ForwardAgent yes
ForwardX11 yes
My mistake was that I included only the ForwardX11 option.
Found the cause, my ~/.ssh/config was incomplete, you need both:
Host *
ForwardAgent yes
ForwardX11 yes
My mistake was that I included only the ForwardX11 option.
answered Aug 30 '12 at 14:49
sorinsorin
3,492205384
3,492205384
12
I'm not sure why this is needed/relevant.ForwardAgentis used to allow keys cached inssh-agentto pass through multiple nested SSH connections. It should not have any relevance to X11. And fwiw, according to some, it's not a good idea security-wise: heipei.github.io/2015/02/26/…
– underscore_d
Sep 24 '15 at 21:08
2
That does not sound right, what helps is to actually turn off X11 forwarding or fix the xauth configuration to set it up. It is not related to ssh agents.
– eckes
Sep 22 '17 at 6:42
This solution did not work for me.
– David M. Karr
Jan 24 at 21:23
add a comment |
12
I'm not sure why this is needed/relevant.ForwardAgentis used to allow keys cached inssh-agentto pass through multiple nested SSH connections. It should not have any relevance to X11. And fwiw, according to some, it's not a good idea security-wise: heipei.github.io/2015/02/26/…
– underscore_d
Sep 24 '15 at 21:08
2
That does not sound right, what helps is to actually turn off X11 forwarding or fix the xauth configuration to set it up. It is not related to ssh agents.
– eckes
Sep 22 '17 at 6:42
This solution did not work for me.
– David M. Karr
Jan 24 at 21:23
12
12
I'm not sure why this is needed/relevant.
ForwardAgent is used to allow keys cached in ssh-agent to pass through multiple nested SSH connections. It should not have any relevance to X11. And fwiw, according to some, it's not a good idea security-wise: heipei.github.io/2015/02/26/…– underscore_d
Sep 24 '15 at 21:08
I'm not sure why this is needed/relevant.
ForwardAgent is used to allow keys cached in ssh-agent to pass through multiple nested SSH connections. It should not have any relevance to X11. And fwiw, according to some, it's not a good idea security-wise: heipei.github.io/2015/02/26/…– underscore_d
Sep 24 '15 at 21:08
2
2
That does not sound right, what helps is to actually turn off X11 forwarding or fix the xauth configuration to set it up. It is not related to ssh agents.
– eckes
Sep 22 '17 at 6:42
That does not sound right, what helps is to actually turn off X11 forwarding or fix the xauth configuration to set it up. It is not related to ssh agents.
– eckes
Sep 22 '17 at 6:42
This solution did not work for me.
– David M. Karr
Jan 24 at 21:23
This solution did not work for me.
– David M. Karr
Jan 24 at 21:23
add a comment |
As noted, it seems that xauth on OS X Yosemite has regressed to an old version that doesn't work with XQuartz's $DISPLAY setting:
% xauth -V
1.0.9
% xauth generate $DISPLAY .
xauth: (argv):1: bad display name "/private/tmp/com.apple.launchd(...)/org.macosforge.xquartz:0" in "add" command
1
I tested the same lines on OS X 10.11, and I do not get any error. Still same version of XQuartz.
– sorin
Mar 1 '16 at 11:48
@guest Yourxauth generate $DISPLAY .command worked on my Mac OS X High Sierra (10.13), and it solved myNo xauth data; using fake authentication data for X11 forwarding.pb.
– SebMa
Aug 10 '18 at 16:13
add a comment |
As noted, it seems that xauth on OS X Yosemite has regressed to an old version that doesn't work with XQuartz's $DISPLAY setting:
% xauth -V
1.0.9
% xauth generate $DISPLAY .
xauth: (argv):1: bad display name "/private/tmp/com.apple.launchd(...)/org.macosforge.xquartz:0" in "add" command
1
I tested the same lines on OS X 10.11, and I do not get any error. Still same version of XQuartz.
– sorin
Mar 1 '16 at 11:48
@guest Yourxauth generate $DISPLAY .command worked on my Mac OS X High Sierra (10.13), and it solved myNo xauth data; using fake authentication data for X11 forwarding.pb.
– SebMa
Aug 10 '18 at 16:13
add a comment |
As noted, it seems that xauth on OS X Yosemite has regressed to an old version that doesn't work with XQuartz's $DISPLAY setting:
% xauth -V
1.0.9
% xauth generate $DISPLAY .
xauth: (argv):1: bad display name "/private/tmp/com.apple.launchd(...)/org.macosforge.xquartz:0" in "add" command
As noted, it seems that xauth on OS X Yosemite has regressed to an old version that doesn't work with XQuartz's $DISPLAY setting:
% xauth -V
1.0.9
% xauth generate $DISPLAY .
xauth: (argv):1: bad display name "/private/tmp/com.apple.launchd(...)/org.macosforge.xquartz:0" in "add" command
answered Jan 7 '15 at 23:47
guestguest
10112
10112
1
I tested the same lines on OS X 10.11, and I do not get any error. Still same version of XQuartz.
– sorin
Mar 1 '16 at 11:48
@guest Yourxauth generate $DISPLAY .command worked on my Mac OS X High Sierra (10.13), and it solved myNo xauth data; using fake authentication data for X11 forwarding.pb.
– SebMa
Aug 10 '18 at 16:13
add a comment |
1
I tested the same lines on OS X 10.11, and I do not get any error. Still same version of XQuartz.
– sorin
Mar 1 '16 at 11:48
@guest Yourxauth generate $DISPLAY .command worked on my Mac OS X High Sierra (10.13), and it solved myNo xauth data; using fake authentication data for X11 forwarding.pb.
– SebMa
Aug 10 '18 at 16:13
1
1
I tested the same lines on OS X 10.11, and I do not get any error. Still same version of XQuartz.
– sorin
Mar 1 '16 at 11:48
I tested the same lines on OS X 10.11, and I do not get any error. Still same version of XQuartz.
– sorin
Mar 1 '16 at 11:48
@guest Your
xauth generate $DISPLAY . command worked on my Mac OS X High Sierra (10.13), and it solved my No xauth data; using fake authentication data for X11 forwarding. pb.– SebMa
Aug 10 '18 at 16:13
@guest Your
xauth generate $DISPLAY . command worked on my Mac OS X High Sierra (10.13), and it solved my No xauth data; using fake authentication data for X11 forwarding. pb.– SebMa
Aug 10 '18 at 16:13
add a comment |
Letting Ubuntu bash on Windows 10 run ssh -X to get a GUI environment on a remote server
- First
Install all the following. On Window, install Xming. On Ubuntu bash, use sudo apt install to install ssh xauth xorg.
sudo apt install ssh xauth xorg
- Second
Go to the folder contains ssh_config file, mine is /etc/ssh.
- Third
Edit ssh_config as administrator(USE sudo). Inside ssh_config, remove the hash # in the lines ForwardAgent, ForwardX11, ForwardX11Trusted, and set the corresponding arguments to yes.
# /etc/ssh/ssh_config
Host *
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
- Forth
In ssh_config file, remove the front hash # before Port 22 and Protocol 2, and also append a new line at the end of the file to state the xauth file location, XauthLocation /usr/bin/xauth, remember write your own path of xauth file.
# /etc/ssh/ssh_config
# IdentifyFile ...
Port 22
Protocol 2
# Cipher 3des
# ...
# ...
...
...
GSSAPIDelegateCredentials no
XauthLocation /usr/bin/xauth
- Fifth
Now since we are done editing ssh_config file, save it when we leave the editor. Now go to folder ~ or $HOME, append export DISPLAY=localhost:0 to your .bashrc file and save it.
# ~/.bashrc
...
...
export DISPLAY=localhost:0
- Last
We are almost done. Restart your bash shell, open your Xming program and use ssh -X yourusername@yourhost. Then enjoy the GUI environment.
ssh -X yourusername@yourhost
The problem is also in Ubuntu subsystem on Windows, and the link is at
https://gist.github.com/DestinyOne/f236f71b9cdecd349507dfe90ebae776
Note: the linked text includes 2 typos (XauthLocaion instead of XauthLocation)
The question isn't about Windows.
– kasperd
Sep 22 '17 at 7:53
On MacOS it is almost the same, the differences are instead ofXming, we should getXQuartz, and thessh_configfile is in a different location, mine is/private/etc/ssh.
– DestinyOne
Sep 22 '17 at 15:45
And also, the last line forssh_configwill be:XAuthLocation /opt/X11/bin/xauth
– DestinyOne
Sep 22 '17 at 15:58
2
Edit needed:XauthLocaion->XauthLocation(that edit is too small for me to make).
– echristopherson
Mar 3 '18 at 4:05
Besides installingxming,ssh,xauth, andxorg(step 1), the only thing needed for me wasexport DISPLAY=localhost:0
– Eponymous
Mar 8 '18 at 3:35
|
show 1 more comment
Letting Ubuntu bash on Windows 10 run ssh -X to get a GUI environment on a remote server
- First
Install all the following. On Window, install Xming. On Ubuntu bash, use sudo apt install to install ssh xauth xorg.
sudo apt install ssh xauth xorg
- Second
Go to the folder contains ssh_config file, mine is /etc/ssh.
- Third
Edit ssh_config as administrator(USE sudo). Inside ssh_config, remove the hash # in the lines ForwardAgent, ForwardX11, ForwardX11Trusted, and set the corresponding arguments to yes.
# /etc/ssh/ssh_config
Host *
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
- Forth
In ssh_config file, remove the front hash # before Port 22 and Protocol 2, and also append a new line at the end of the file to state the xauth file location, XauthLocation /usr/bin/xauth, remember write your own path of xauth file.
# /etc/ssh/ssh_config
# IdentifyFile ...
Port 22
Protocol 2
# Cipher 3des
# ...
# ...
...
...
GSSAPIDelegateCredentials no
XauthLocation /usr/bin/xauth
- Fifth
Now since we are done editing ssh_config file, save it when we leave the editor. Now go to folder ~ or $HOME, append export DISPLAY=localhost:0 to your .bashrc file and save it.
# ~/.bashrc
...
...
export DISPLAY=localhost:0
- Last
We are almost done. Restart your bash shell, open your Xming program and use ssh -X yourusername@yourhost. Then enjoy the GUI environment.
ssh -X yourusername@yourhost
The problem is also in Ubuntu subsystem on Windows, and the link is at
https://gist.github.com/DestinyOne/f236f71b9cdecd349507dfe90ebae776
Note: the linked text includes 2 typos (XauthLocaion instead of XauthLocation)
The question isn't about Windows.
– kasperd
Sep 22 '17 at 7:53
On MacOS it is almost the same, the differences are instead ofXming, we should getXQuartz, and thessh_configfile is in a different location, mine is/private/etc/ssh.
– DestinyOne
Sep 22 '17 at 15:45
And also, the last line forssh_configwill be:XAuthLocation /opt/X11/bin/xauth
– DestinyOne
Sep 22 '17 at 15:58
2
Edit needed:XauthLocaion->XauthLocation(that edit is too small for me to make).
– echristopherson
Mar 3 '18 at 4:05
Besides installingxming,ssh,xauth, andxorg(step 1), the only thing needed for me wasexport DISPLAY=localhost:0
– Eponymous
Mar 8 '18 at 3:35
|
show 1 more comment
Letting Ubuntu bash on Windows 10 run ssh -X to get a GUI environment on a remote server
- First
Install all the following. On Window, install Xming. On Ubuntu bash, use sudo apt install to install ssh xauth xorg.
sudo apt install ssh xauth xorg
- Second
Go to the folder contains ssh_config file, mine is /etc/ssh.
- Third
Edit ssh_config as administrator(USE sudo). Inside ssh_config, remove the hash # in the lines ForwardAgent, ForwardX11, ForwardX11Trusted, and set the corresponding arguments to yes.
# /etc/ssh/ssh_config
Host *
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
- Forth
In ssh_config file, remove the front hash # before Port 22 and Protocol 2, and also append a new line at the end of the file to state the xauth file location, XauthLocation /usr/bin/xauth, remember write your own path of xauth file.
# /etc/ssh/ssh_config
# IdentifyFile ...
Port 22
Protocol 2
# Cipher 3des
# ...
# ...
...
...
GSSAPIDelegateCredentials no
XauthLocation /usr/bin/xauth
- Fifth
Now since we are done editing ssh_config file, save it when we leave the editor. Now go to folder ~ or $HOME, append export DISPLAY=localhost:0 to your .bashrc file and save it.
# ~/.bashrc
...
...
export DISPLAY=localhost:0
- Last
We are almost done. Restart your bash shell, open your Xming program and use ssh -X yourusername@yourhost. Then enjoy the GUI environment.
ssh -X yourusername@yourhost
The problem is also in Ubuntu subsystem on Windows, and the link is at
https://gist.github.com/DestinyOne/f236f71b9cdecd349507dfe90ebae776
Note: the linked text includes 2 typos (XauthLocaion instead of XauthLocation)
Letting Ubuntu bash on Windows 10 run ssh -X to get a GUI environment on a remote server
- First
Install all the following. On Window, install Xming. On Ubuntu bash, use sudo apt install to install ssh xauth xorg.
sudo apt install ssh xauth xorg
- Second
Go to the folder contains ssh_config file, mine is /etc/ssh.
- Third
Edit ssh_config as administrator(USE sudo). Inside ssh_config, remove the hash # in the lines ForwardAgent, ForwardX11, ForwardX11Trusted, and set the corresponding arguments to yes.
# /etc/ssh/ssh_config
Host *
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
- Forth
In ssh_config file, remove the front hash # before Port 22 and Protocol 2, and also append a new line at the end of the file to state the xauth file location, XauthLocation /usr/bin/xauth, remember write your own path of xauth file.
# /etc/ssh/ssh_config
# IdentifyFile ...
Port 22
Protocol 2
# Cipher 3des
# ...
# ...
...
...
GSSAPIDelegateCredentials no
XauthLocation /usr/bin/xauth
- Fifth
Now since we are done editing ssh_config file, save it when we leave the editor. Now go to folder ~ or $HOME, append export DISPLAY=localhost:0 to your .bashrc file and save it.
# ~/.bashrc
...
...
export DISPLAY=localhost:0
- Last
We are almost done. Restart your bash shell, open your Xming program and use ssh -X yourusername@yourhost. Then enjoy the GUI environment.
ssh -X yourusername@yourhost
The problem is also in Ubuntu subsystem on Windows, and the link is at
https://gist.github.com/DestinyOne/f236f71b9cdecd349507dfe90ebae776
Note: the linked text includes 2 typos (XauthLocaion instead of XauthLocation)
edited Apr 19 '18 at 14:43
Andrew Schulman
6,457102241
6,457102241
answered Sep 22 '17 at 2:05
DestinyOneDestinyOne
10115
10115
The question isn't about Windows.
– kasperd
Sep 22 '17 at 7:53
On MacOS it is almost the same, the differences are instead ofXming, we should getXQuartz, and thessh_configfile is in a different location, mine is/private/etc/ssh.
– DestinyOne
Sep 22 '17 at 15:45
And also, the last line forssh_configwill be:XAuthLocation /opt/X11/bin/xauth
– DestinyOne
Sep 22 '17 at 15:58
2
Edit needed:XauthLocaion->XauthLocation(that edit is too small for me to make).
– echristopherson
Mar 3 '18 at 4:05
Besides installingxming,ssh,xauth, andxorg(step 1), the only thing needed for me wasexport DISPLAY=localhost:0
– Eponymous
Mar 8 '18 at 3:35
|
show 1 more comment
The question isn't about Windows.
– kasperd
Sep 22 '17 at 7:53
On MacOS it is almost the same, the differences are instead ofXming, we should getXQuartz, and thessh_configfile is in a different location, mine is/private/etc/ssh.
– DestinyOne
Sep 22 '17 at 15:45
And also, the last line forssh_configwill be:XAuthLocation /opt/X11/bin/xauth
– DestinyOne
Sep 22 '17 at 15:58
2
Edit needed:XauthLocaion->XauthLocation(that edit is too small for me to make).
– echristopherson
Mar 3 '18 at 4:05
Besides installingxming,ssh,xauth, andxorg(step 1), the only thing needed for me wasexport DISPLAY=localhost:0
– Eponymous
Mar 8 '18 at 3:35
The question isn't about Windows.
– kasperd
Sep 22 '17 at 7:53
The question isn't about Windows.
– kasperd
Sep 22 '17 at 7:53
On MacOS it is almost the same, the differences are instead of
Xming, we should get XQuartz, and the ssh_config file is in a different location, mine is /private/etc/ssh.– DestinyOne
Sep 22 '17 at 15:45
On MacOS it is almost the same, the differences are instead of
Xming, we should get XQuartz, and the ssh_config file is in a different location, mine is /private/etc/ssh.– DestinyOne
Sep 22 '17 at 15:45
And also, the last line for
ssh_config will be: XAuthLocation /opt/X11/bin/xauth– DestinyOne
Sep 22 '17 at 15:58
And also, the last line for
ssh_config will be: XAuthLocation /opt/X11/bin/xauth– DestinyOne
Sep 22 '17 at 15:58
2
2
Edit needed:
XauthLocaion -> XauthLocation (that edit is too small for me to make).– echristopherson
Mar 3 '18 at 4:05
Edit needed:
XauthLocaion -> XauthLocation (that edit is too small for me to make).– echristopherson
Mar 3 '18 at 4:05
Besides installing
xming, ssh,xauth, and xorg (step 1), the only thing needed for me was export DISPLAY=localhost:0– Eponymous
Mar 8 '18 at 3:35
Besides installing
xming, ssh,xauth, and xorg (step 1), the only thing needed for me was export DISPLAY=localhost:0– Eponymous
Mar 8 '18 at 3:35
|
show 1 more comment
There is a bug in MacOS at the moment. I came across this too. The fix for me involved adding the following to my .bash_profile
dispdir=`dirname $DISPLAY`
dispfile=`basename $DISPLAY`
dispnew="$dispdir/:0"
if [ -e $DISPLAY -a "$dispfile" = "org.x:0" ]; then
mv $DISPLAY $dispnew
fi
export DISPLAY=$dispnew
Essentially the name for the file pipe associated with your X root can't be handled correctly, and thus needs correction. :-)
I doubt this would solve the error in GUI OS X apps, like SourceTree.
– sorin
Mar 1 '16 at 11:49
Confirming it does work on Sierra for running emacs using X - as the Mac is the server. this should work broadly in cases where the client is on a remote machine
– Mark Mullin
Dec 18 '16 at 16:24
add a comment |
There is a bug in MacOS at the moment. I came across this too. The fix for me involved adding the following to my .bash_profile
dispdir=`dirname $DISPLAY`
dispfile=`basename $DISPLAY`
dispnew="$dispdir/:0"
if [ -e $DISPLAY -a "$dispfile" = "org.x:0" ]; then
mv $DISPLAY $dispnew
fi
export DISPLAY=$dispnew
Essentially the name for the file pipe associated with your X root can't be handled correctly, and thus needs correction. :-)
I doubt this would solve the error in GUI OS X apps, like SourceTree.
– sorin
Mar 1 '16 at 11:49
Confirming it does work on Sierra for running emacs using X - as the Mac is the server. this should work broadly in cases where the client is on a remote machine
– Mark Mullin
Dec 18 '16 at 16:24
add a comment |
There is a bug in MacOS at the moment. I came across this too. The fix for me involved adding the following to my .bash_profile
dispdir=`dirname $DISPLAY`
dispfile=`basename $DISPLAY`
dispnew="$dispdir/:0"
if [ -e $DISPLAY -a "$dispfile" = "org.x:0" ]; then
mv $DISPLAY $dispnew
fi
export DISPLAY=$dispnew
Essentially the name for the file pipe associated with your X root can't be handled correctly, and thus needs correction. :-)
There is a bug in MacOS at the moment. I came across this too. The fix for me involved adding the following to my .bash_profile
dispdir=`dirname $DISPLAY`
dispfile=`basename $DISPLAY`
dispnew="$dispdir/:0"
if [ -e $DISPLAY -a "$dispfile" = "org.x:0" ]; then
mv $DISPLAY $dispnew
fi
export DISPLAY=$dispnew
Essentially the name for the file pipe associated with your X root can't be handled correctly, and thus needs correction. :-)
answered Sep 8 '12 at 5:29
Red TuxRed Tux
2,0341114
2,0341114
I doubt this would solve the error in GUI OS X apps, like SourceTree.
– sorin
Mar 1 '16 at 11:49
Confirming it does work on Sierra for running emacs using X - as the Mac is the server. this should work broadly in cases where the client is on a remote machine
– Mark Mullin
Dec 18 '16 at 16:24
add a comment |
I doubt this would solve the error in GUI OS X apps, like SourceTree.
– sorin
Mar 1 '16 at 11:49
Confirming it does work on Sierra for running emacs using X - as the Mac is the server. this should work broadly in cases where the client is on a remote machine
– Mark Mullin
Dec 18 '16 at 16:24
I doubt this would solve the error in GUI OS X apps, like SourceTree.
– sorin
Mar 1 '16 at 11:49
I doubt this would solve the error in GUI OS X apps, like SourceTree.
– sorin
Mar 1 '16 at 11:49
Confirming it does work on Sierra for running emacs using X - as the Mac is the server. this should work broadly in cases where the client is on a remote machine
– Mark Mullin
Dec 18 '16 at 16:24
Confirming it does work on Sierra for running emacs using X - as the Mac is the server. this should work broadly in cases where the client is on a remote machine
– Mark Mullin
Dec 18 '16 at 16:24
add a comment |
Including
XAuthLocation /opt/local/bin/xauth
in ~/.ssh/config
in my macOS Sierra 10.12.6 worked for me. A small change from answer 7).
add a comment |
Including
XAuthLocation /opt/local/bin/xauth
in ~/.ssh/config
in my macOS Sierra 10.12.6 worked for me. A small change from answer 7).
add a comment |
Including
XAuthLocation /opt/local/bin/xauth
in ~/.ssh/config
in my macOS Sierra 10.12.6 worked for me. A small change from answer 7).
Including
XAuthLocation /opt/local/bin/xauth
in ~/.ssh/config
in my macOS Sierra 10.12.6 worked for me. A small change from answer 7).
answered Aug 1 '17 at 14:45
Kepler Oliveira FilhoKepler Oliveira Filho
211
211
add a comment |
add a comment |
i just removed ~/.Xauthority (destination machine) from my root folder and ssh -X 192.168.123.1 again and ik worked.
I can confirm this is an answer on Mac OS Sierra 10.12.4. Removing ~/.Xauthority on SSH server does the trick:~$ mv ~/.Xauthority ~/.Xauthority.bakA new magic cookie was automatically put back in ~/.Xauthority once I logged in again. No Bash scripting is required at all.
– Kenneth Pegasus
May 31 '17 at 23:45
add a comment |
i just removed ~/.Xauthority (destination machine) from my root folder and ssh -X 192.168.123.1 again and ik worked.
I can confirm this is an answer on Mac OS Sierra 10.12.4. Removing ~/.Xauthority on SSH server does the trick:~$ mv ~/.Xauthority ~/.Xauthority.bakA new magic cookie was automatically put back in ~/.Xauthority once I logged in again. No Bash scripting is required at all.
– Kenneth Pegasus
May 31 '17 at 23:45
add a comment |
i just removed ~/.Xauthority (destination machine) from my root folder and ssh -X 192.168.123.1 again and ik worked.
i just removed ~/.Xauthority (destination machine) from my root folder and ssh -X 192.168.123.1 again and ik worked.
answered Apr 2 '17 at 10:01
Marcel KraanMarcel Kraan
71
71
I can confirm this is an answer on Mac OS Sierra 10.12.4. Removing ~/.Xauthority on SSH server does the trick:~$ mv ~/.Xauthority ~/.Xauthority.bakA new magic cookie was automatically put back in ~/.Xauthority once I logged in again. No Bash scripting is required at all.
– Kenneth Pegasus
May 31 '17 at 23:45
add a comment |
I can confirm this is an answer on Mac OS Sierra 10.12.4. Removing ~/.Xauthority on SSH server does the trick:~$ mv ~/.Xauthority ~/.Xauthority.bakA new magic cookie was automatically put back in ~/.Xauthority once I logged in again. No Bash scripting is required at all.
– Kenneth Pegasus
May 31 '17 at 23:45
I can confirm this is an answer on Mac OS Sierra 10.12.4. Removing ~/.Xauthority on SSH server does the trick:
~$ mv ~/.Xauthority ~/.Xauthority.bak A new magic cookie was automatically put back in ~/.Xauthority once I logged in again. No Bash scripting is required at all.– Kenneth Pegasus
May 31 '17 at 23:45
I can confirm this is an answer on Mac OS Sierra 10.12.4. Removing ~/.Xauthority on SSH server does the trick:
~$ mv ~/.Xauthority ~/.Xauthority.bak A new magic cookie was automatically put back in ~/.Xauthority once I logged in again. No Bash scripting is required at all.– Kenneth Pegasus
May 31 '17 at 23:45
add a comment |
In my case it was the problem of .Xauthority containing the Magic cookie
not forwarded, Fabby on http://askubuntu.com/questions/571116/ recommends
on 2014-11-14 to add this line at the end of the .bashrc or . profile
to allow forwarding of xauth keys between users when calling su:
export $(dbus-launch)
I added also previously:
export XAUTHORITY=~/.Xauthority
to ensure remote called with ssh -X ̍@ will find it.
In my case .Xauthority is a symlink to original user /home//.Xauthority I su from...
cd /home/<child_user>;ln -sf /home/<parent_user>/.Xauthority .xAuthority
with correct rights:
sudo chown <parent_user> /home/<parent_user>/.profile
chmod a+rw /home/<parent_user>/.profile
so it is accessible to and to . will be able to trigger apps on and display X-windowed result on its local screen throughout proxy account !
TIP : Check xauth list...if reflects magic cookie on .
add a comment |
In my case it was the problem of .Xauthority containing the Magic cookie
not forwarded, Fabby on http://askubuntu.com/questions/571116/ recommends
on 2014-11-14 to add this line at the end of the .bashrc or . profile
to allow forwarding of xauth keys between users when calling su:
export $(dbus-launch)
I added also previously:
export XAUTHORITY=~/.Xauthority
to ensure remote called with ssh -X ̍@ will find it.
In my case .Xauthority is a symlink to original user /home//.Xauthority I su from...
cd /home/<child_user>;ln -sf /home/<parent_user>/.Xauthority .xAuthority
with correct rights:
sudo chown <parent_user> /home/<parent_user>/.profile
chmod a+rw /home/<parent_user>/.profile
so it is accessible to and to . will be able to trigger apps on and display X-windowed result on its local screen throughout proxy account !
TIP : Check xauth list...if reflects magic cookie on .
add a comment |
In my case it was the problem of .Xauthority containing the Magic cookie
not forwarded, Fabby on http://askubuntu.com/questions/571116/ recommends
on 2014-11-14 to add this line at the end of the .bashrc or . profile
to allow forwarding of xauth keys between users when calling su:
export $(dbus-launch)
I added also previously:
export XAUTHORITY=~/.Xauthority
to ensure remote called with ssh -X ̍@ will find it.
In my case .Xauthority is a symlink to original user /home//.Xauthority I su from...
cd /home/<child_user>;ln -sf /home/<parent_user>/.Xauthority .xAuthority
with correct rights:
sudo chown <parent_user> /home/<parent_user>/.profile
chmod a+rw /home/<parent_user>/.profile
so it is accessible to and to . will be able to trigger apps on and display X-windowed result on its local screen throughout proxy account !
TIP : Check xauth list...if reflects magic cookie on .
In my case it was the problem of .Xauthority containing the Magic cookie
not forwarded, Fabby on http://askubuntu.com/questions/571116/ recommends
on 2014-11-14 to add this line at the end of the .bashrc or . profile
to allow forwarding of xauth keys between users when calling su:
export $(dbus-launch)
I added also previously:
export XAUTHORITY=~/.Xauthority
to ensure remote called with ssh -X ̍@ will find it.
In my case .Xauthority is a symlink to original user /home//.Xauthority I su from...
cd /home/<child_user>;ln -sf /home/<parent_user>/.Xauthority .xAuthority
with correct rights:
sudo chown <parent_user> /home/<parent_user>/.profile
chmod a+rw /home/<parent_user>/.profile
so it is accessible to and to . will be able to trigger apps on and display X-windowed result on its local screen throughout proxy account !
TIP : Check xauth list...if reflects magic cookie on .
answered Jun 9 '17 at 14:44
all-informaticall-informatic
111
111
add a comment |
add a comment |
I would add this as a comment, but I don't have enough rep. Adding one more line to sorin's solution worked for me.
Open your ssh config file with vim ~/.ssh/config
Then add these lines to it:
Host *
ForwardAgent yes
ForwardX11 yes
XAuthLocation /opt/X11/bin/xauth
You can double check your xauth location with:
which xauth
Not sure if this would really work because xauth location would be different on each remote machine. Yours looks like a MacOS one, but Linux has it in different location. I mostly started to disable ForwardX11 completly because I almost never user it.
– sorin
Feb 23 at 8:23
add a comment |
I would add this as a comment, but I don't have enough rep. Adding one more line to sorin's solution worked for me.
Open your ssh config file with vim ~/.ssh/config
Then add these lines to it:
Host *
ForwardAgent yes
ForwardX11 yes
XAuthLocation /opt/X11/bin/xauth
You can double check your xauth location with:
which xauth
Not sure if this would really work because xauth location would be different on each remote machine. Yours looks like a MacOS one, but Linux has it in different location. I mostly started to disable ForwardX11 completly because I almost never user it.
– sorin
Feb 23 at 8:23
add a comment |
I would add this as a comment, but I don't have enough rep. Adding one more line to sorin's solution worked for me.
Open your ssh config file with vim ~/.ssh/config
Then add these lines to it:
Host *
ForwardAgent yes
ForwardX11 yes
XAuthLocation /opt/X11/bin/xauth
You can double check your xauth location with:
which xauth
I would add this as a comment, but I don't have enough rep. Adding one more line to sorin's solution worked for me.
Open your ssh config file with vim ~/.ssh/config
Then add these lines to it:
Host *
ForwardAgent yes
ForwardX11 yes
XAuthLocation /opt/X11/bin/xauth
You can double check your xauth location with:
which xauth
answered Feb 22 at 20:27
ssanchssanch
1
1
Not sure if this would really work because xauth location would be different on each remote machine. Yours looks like a MacOS one, but Linux has it in different location. I mostly started to disable ForwardX11 completly because I almost never user it.
– sorin
Feb 23 at 8:23
add a comment |
Not sure if this would really work because xauth location would be different on each remote machine. Yours looks like a MacOS one, but Linux has it in different location. I mostly started to disable ForwardX11 completly because I almost never user it.
– sorin
Feb 23 at 8:23
Not sure if this would really work because xauth location would be different on each remote machine. Yours looks like a MacOS one, but Linux has it in different location. I mostly started to disable ForwardX11 completly because I almost never user it.
– sorin
Feb 23 at 8:23
Not sure if this would really work because xauth location would be different on each remote machine. Yours looks like a MacOS one, but Linux has it in different location. I mostly started to disable ForwardX11 completly because I almost never user it.
– sorin
Feb 23 at 8:23
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f422908%2fhow-can-i-prevent-the-warning-no-xauth-data-using-fake-authentication-data-for%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
What command are you using to ssh?
– DerfK
Aug 30 '12 at 14:43
@DerfK just
ssh hostnamebut in my~/.ssh/configI addedForwardX11 yessome time ago. Still this is something that I do want to have there.– sorin
Aug 30 '12 at 14:45
Using Ubuntu 16.04 LTS (August 2017) I give up. Bottom line is that even though it gives the error, it works. I use
ssh -Y hostnamefrom Linux, andssh -x hostnamewhen using OpenSSH on Windows.– SDsolar
Aug 31 '17 at 5:55