How can the answer be improved?
I've asked the administrator to create a home folder for me but due to some. How to generate a new Xauthority with no. I have no.Xauthority file and I cannot. When I ssh into a headless Linux Mint 17 system, it doesn't create update / create an.Xauthority file. Moreover, when I run xauth I get the reply: marty@N40L.
Thank you nrickert I just realized that I also have also problems in the passwordless login with both rsa dsa authentication this is the sshdconfig file in the server and below there is the log of ssh -vvv -X DISPLAY variable is not set #$OpenBSD: sshdconfig,v 1.82 2010/09/06 17:10:19 naddy Exp $ # This is the sshd server system-wide configuration file. See # sshdconfig(5) for more information. # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin # The strategy used for options in the default sshdconfig shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented. Uncommented options change a # default value. On 04:26 PM, gigilentini8 wrote: maybe it is because I removed by mistake all the. files in home folder including.Xauthority times ago oops!
what should I do? Are you sure you know all the damage done to this system (by you or others)? If not i would not trust it, and would save off data and rebuild the system.and, then don't remove stuff that you don't have a.backup. to repair the damage.
Otherwise the only option is to try to chase down all the individual problems one by one.and, that is gonna be hard for you, and impossible for us to do from afar. Ymmv - dd. Debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /home/user debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /home/user The '.Xauthority file should be automatically recreated as needed, unless there's a permissions problem.
You need to check permissions of '/home' and '/home/usr'. '/home' should be owned by root, and should not be group or other writable. '/home/user' (for the particular user) should be owned by the user, and should be writable by the owner but not by groups or others.
Best to also check '/home/user/.ssh' permissions.
I need to change the.Xauthority file location for a group of users to be $HOME/tmp/.Xauthority rather than the default $HOME/.Xauthority. I already tried what I could catch up from several sources like: I set the environment variable like this in several /etc/.profile,.profile,.bashrc. With the follwing: XAUTHORITY=$HOME/tmp/.Xauthority With the result of: Any login attempt with a user of sshx group (ssh -X server) results in timeout in locking $HOME/.Xauthority. It is like having changed nothing. Interesting about is that if I echo $XAUTHORITY it shows $HOME/tmp/.Xauthority. Authx is working as well, but not @ the time of login.
Therefore the processing I need must happen somewhere before ssh -X or while establishing the X connection. Where do I have to change it so that I can address a group of users only since I do not want root or users without a sshX group be affected since they eventually do not have the directory. I came up with something partial, but still I have now the.Xauthority relocated to /tmp/.Xauthority which is actually a great progress for now. (Ubuntu Server is the target OS) All the settings stay the same only a file need to be created /.ssh/rc which is loaded upon connection of ssh -X servername: if read proto cookie && -n '$DISPLAY' ; then if `echo $DISPLAY cut -c1-10` = 'localhost:' ; then # X11UseLocalhost=yes echo add unix:`echo $DISPLAY cut -c11-` $proto $cookie else # X11UseLocalhost=no echo add $DISPLAY $proto $cookie fi xauth -q -f /tmp/.Xauthority - fi which starts the xauth and creates the file in the location you want, it also adds/creates entries in the.Xauthority file for proper authentication.
Now you need to modifiy the./profile since the shell is loaded it needs to know where the.Xauthority file is found. Therefore we add one line at the very top: export XAUTHORITY=/tmp/.Xauthority This enables me to connect via ssh -X servername to a shell and start any X app.
Lets try this by starting xeyes or xclock. Cool, but still another issue came up to me to have it done right, but I have no solution for it now. If you try to start the X app directly from the remote, like: x@y:$ ssh -X servername xeyes X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication. X11 connection rejected because of wrong authentication. X11 connection rejected because of wrong authentication.
Error: Can't open display: localhost:11.0 This is a interesting error, since if you google it there are a lot of answers, but now the situation itself leads to that assumption that something is different when bash is loaded and it is left out. The only thing I assume is the line in.profile which sets the XAUTHORITY variable, but how do I set it without loading a shell. Why does it work if I have a user which has the.Xauthority file in the default location (/.Xauthority)?