Re: raspberry PI - no X11
Thanks for the detailed explanation (in case this happens again). As I already wrote, I chose the "easy ???" way and re-installed and everything is back to normal. On Tue, 6 Feb 2018 20:06:14 +0200 Lior Okmanwrote: > Hi, > > Sorry, I just saw the thread right now. > > If it happens again: > > Your $HOME/.Xauthority file contains the authentication key that is > used to authenticate your X sessions. This file is manipulated with > the xauth command. When you ssh with the -X switch, it is supposed to > add an entry to your .Xauthority file to allow you to connect to the > X server - but it sometimes doesn't work. > > Best fix is to use xauth to delete the bad key and enter the correct > one - use xauth on your local host to find the correct value, and > then use xauth on the remote host to delete the bad key and add the > correct key. > > Easier fix is to simply delete the .Xauthority file on the remote > host and try to login again and let ssh recreate it. > > You could also copy the .Xauthority file from your main host to the > pi. > > :-) Or you could format the machine and hope for the best :-) > > -- > Regards, > Lior > > On Tue, Feb 6, 2018 at 11:35 AM, Shlomo Solomon > wrote: > > > I finally gave up and did a re-installed of Raspbian and everything > > is back to normal. Since I do regular backups of /home and /etc, I > > got everything back to normal with no major problems. > > > > > > On Tue, 6 Feb 2018 10:20:12 +0100 > > Tzafrir Cohen wrote: > > > > > On Sun, Feb 04, 2018 at 11:54:01AM +0200, Shlomo Solomon wrote: > > > > I really don't know how I screwed this up, but I've been > > > > "playing" with this for hours with no success. > > > > > > > > I have a raspberry PI file server. I rarely use the GUI and > > > > when I do it's usually over VNC (I use KRDC) or with ssh -X. > > > > > > > > As of today: > > > > 1 - KRDC won't connect > > > > > > > > 2 - ssh -X pi@pi (pi is defined in /etc/hosts) gives only a > > > > console login and says: > > > > X11 connection rejected because of wrong authentication. > > > > > > > > > > What are the values of DISPLAY and XAUTHORITY when you connect via > > > ssh? > > > > > > > 3 - I connected a monitor directly to the PI and it will not > > > > accept the pi password when I try to login to X11 - but DOES > > > > accept the root password. So X11 is OK, but only for root - not > > > > the regular pi user. > > > > > > I must be missing something, but: how are the two related? In (2) > > > you try to authorize X11 programs on the pi to connect to an X > > > server running on your PC. > > > > > > In (3) you run an X server on the pi (and X11 clients running on > > > the pi that should connect to it). > > > > > > > > > > > -- > > Shlomo Solomon > > http://the-solomons.net > > Claws Mail 3.11.1 - KDE 4.14.30 - Dolphin 4.14.3 - LINUX Mageia 5 > > > > ___ > > Linux-il mailing list > > Linux-il@cs.huji.ac.il > > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > > -- Shlomo Solomon http://the-solomons.net Claws Mail 3.11.1 - KDE 4.14.30 - Dolphin 4.14.3 - LINUX Mageia 5 ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: raspberry PI - no X11
Hi, Sorry, I just saw the thread right now. If it happens again: Your $HOME/.Xauthority file contains the authentication key that is used to authenticate your X sessions. This file is manipulated with the xauth command. When you ssh with the -X switch, it is supposed to add an entry to your .Xauthority file to allow you to connect to the X server - but it sometimes doesn't work. Best fix is to use xauth to delete the bad key and enter the correct one - use xauth on your local host to find the correct value, and then use xauth on the remote host to delete the bad key and add the correct key. Easier fix is to simply delete the .Xauthority file on the remote host and try to login again and let ssh recreate it. You could also copy the .Xauthority file from your main host to the pi. :-) Or you could format the machine and hope for the best :-) -- Regards, Lior On Tue, Feb 6, 2018 at 11:35 AM, Shlomo Solomonwrote: > I finally gave up and did a re-installed of Raspbian and everything is > back to normal. Since I do regular backups of /home and /etc, I got > everything back to normal with no major problems. > > > On Tue, 6 Feb 2018 10:20:12 +0100 > Tzafrir Cohen wrote: > > > On Sun, Feb 04, 2018 at 11:54:01AM +0200, Shlomo Solomon wrote: > > > I really don't know how I screwed this up, but I've been "playing" > > > with this for hours with no success. > > > > > > I have a raspberry PI file server. I rarely use the GUI and when I > > > do it's usually over VNC (I use KRDC) or with ssh -X. > > > > > > As of today: > > > 1 - KRDC won't connect > > > > > > 2 - ssh -X pi@pi (pi is defined in /etc/hosts) gives only a > > > console login and says: > > > X11 connection rejected because of wrong authentication. > > > > > > > What are the values of DISPLAY and XAUTHORITY when you connect via > > ssh? > > > > > 3 - I connected a monitor directly to the PI and it will not accept > > > the pi password when I try to login to X11 - but DOES accept the > > > root password. So X11 is OK, but only for root - not the regular pi > > > user. > > > > I must be missing something, but: how are the two related? In (2) you > > try to authorize X11 programs on the pi to connect to an X server > > running on your PC. > > > > In (3) you run an X server on the pi (and X11 clients running on the > > pi that should connect to it). > > > > > > -- > Shlomo Solomon > http://the-solomons.net > Claws Mail 3.11.1 - KDE 4.14.30 - Dolphin 4.14.3 - LINUX Mageia 5 > > ___ > Linux-il mailing list > Linux-il@cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: raspberry PI - no X11
I finally gave up and did a re-installed of Raspbian and everything is back to normal. Since I do regular backups of /home and /etc, I got everything back to normal with no major problems. On Tue, 6 Feb 2018 10:20:12 +0100 Tzafrir Cohenwrote: > On Sun, Feb 04, 2018 at 11:54:01AM +0200, Shlomo Solomon wrote: > > I really don't know how I screwed this up, but I've been "playing" > > with this for hours with no success. > > > > I have a raspberry PI file server. I rarely use the GUI and when I > > do it's usually over VNC (I use KRDC) or with ssh -X. > > > > As of today: > > 1 - KRDC won't connect > > > > 2 - ssh -X pi@pi (pi is defined in /etc/hosts) gives only a > > console login and says: > > X11 connection rejected because of wrong authentication. > > > > What are the values of DISPLAY and XAUTHORITY when you connect via > ssh? > > > 3 - I connected a monitor directly to the PI and it will not accept > > the pi password when I try to login to X11 - but DOES accept the > > root password. So X11 is OK, but only for root - not the regular pi > > user. > > I must be missing something, but: how are the two related? In (2) you > try to authorize X11 programs on the pi to connect to an X server > running on your PC. > > In (3) you run an X server on the pi (and X11 clients running on the > pi that should connect to it). > -- Shlomo Solomon http://the-solomons.net Claws Mail 3.11.1 - KDE 4.14.30 - Dolphin 4.14.3 - LINUX Mageia 5 ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: raspberry PI - no X11
On Sun, Feb 04, 2018 at 11:54:01AM +0200, Shlomo Solomon wrote: > I really don't know how I screwed this up, but I've been "playing" with > this for hours with no success. > > I have a raspberry PI file server. I rarely use the GUI and when I do > it's usually over VNC (I use KRDC) or with ssh -X. > > As of today: > 1 - KRDC won't connect > > 2 - ssh -X pi@pi (pi is defined in /etc/hosts) gives only a console > login and says: > X11 connection rejected because of wrong authentication. > What are the values of DISPLAY and XAUTHORITY when you connect via ssh? > 3 - I connected a monitor directly to the PI and it will not accept the > pi password when I try to login to X11 - but DOES accept the root > password. So X11 is OK, but only for root - not the regular pi user. I must be missing something, but: how are the two related? In (2) you try to authorize X11 programs on the pi to connect to an X server running on your PC. In (3) you run an X server on the pi (and X11 clients running on the pi that should connect to it). -- Tzafrir Cohen | tzaf...@jabber.org | VIM is http://tzafrir.org.il || a Mutt's tzaf...@cohens.org.il || best tzaf...@debian.org|| friend ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: raspberry PI - no X11
Check the memory card. I quit using Pi due to frequent problems with various mem cards. I kept regular backups and images just to repair the problems. On 04/02/2018 14:18, Borissh1983 wrote: Server side : Please make sure you have free disk space for the user to use, and that the current user is owning ~/.Xauthority. Make sure that you didn't touch ForwardX11Timeout setting for sshd.conf. This can also be caused by selinux To verify it is not a user restriction, add a brand new user with a home dir under /home and see if you can do ssh -X Client side: make sure you can ssh -X to other hosts. On Sun, Feb 4, 2018 at 1:20 PM, Shlomo Solomonwrote: On Sun, 4 Feb 2018 12:26:41 +0200 shimi wrote: > On Sun, Feb 4, 2018 at 11:54 AM, Shlomo Solomon > wrote: > > > I really don't know how I screwed this up, but I've been "playing" > > with this for hours with no success. > > > > I have a raspberry PI file server. I rarely use the GUI and when I > > do it's usually over VNC (I use KRDC) or with ssh -X. > > > > As of today: > > 1 - KRDC won't connect > > > > 2 - ssh -X pi@pi (pi is defined in /etc/hosts) gives only a > > console login and says: > > X11 connection rejected because of wrong authentication. > > > > 3 - I connected a monitor directly to the PI and it will not accept > > the pi password when I try to login to X11 - but DOES accept the > > root password. So X11 is OK, but only for root - not the regular pi > > user. > > > > > > > Not a Pi expert so I'll answer this as if it was a generic Linux > question... > > 1. You didn't mention if you tried to simply reset the pi user > password from root by invoking 'passwd pi'? > > 2. Assuming SSH authentication via public key (I have to assume > because I couldn't find the authentication method in the > question...), one has to make sure that the home directory of the > user authenticating to is with not-too-open permissions (for starters > the safest bet is chmod 700), likewise for all all ancestor > directories of said home directory, because if they're too open, > another user might be able to simply replace your homedir with > another homedir, and then log in as you; To discourage such > possibility, SSH blocks authentication whenever the permissions are > too wide. > > 3. If all the above fails (or you already tried and everything is in > order), I would look at /var/log/messages (or Pi equivalent) while > attempting to login to the user, to see if any hint is available > there. Also, over ssh, using 'ssh -v' might output something useful. > > HTH, > > -- Shimi Thanks, but the problem is not the pi password or ssh. I CAN login over ssh, but do not get X11. And this is exactly what happens when I connect a monitor and keyboard directly to the PI. Just in case, I added -v to the ssh command as you suggested and here are the last few lines of the output: debug1: Next authentication method: password pi@pi's password: debug1: Authentication succeeded (password). Authenticated to pi ([10.0.0.51]:22). debug1: channel 0: new [client-session] debug1: Requesting no-more-sessi...@openssh.com debug1: Entering interactive session. debug1:
Re: raspberry PI - no X11
Server side : Please make sure you have free disk space for the user to use, and that the current user is owning ~/.Xauthority. Make sure that you didn't touch ForwardX11Timeout setting for sshd.conf. This can also be caused by selinux To verify it is not a user restriction, add a brand new user with a home dir under /home and see if you can do ssh -X Client side: make sure you can ssh -X to other hosts. On Sun, Feb 4, 2018 at 1:20 PM, Shlomo Solomonwrote: > On Sun, 4 Feb 2018 12:26:41 +0200 > shimi wrote: > > > On Sun, Feb 4, 2018 at 11:54 AM, Shlomo Solomon > > wrote: > > > > > I really don't know how I screwed this up, but I've been "playing" > > > with this for hours with no success. > > > > > > I have a raspberry PI file server. I rarely use the GUI and when I > > > do it's usually over VNC (I use KRDC) or with ssh -X. > > > > > > As of today: > > > 1 - KRDC won't connect > > > > > > 2 - ssh -X pi@pi (pi is defined in /etc/hosts) gives only a > > > console login and says: > > > X11 connection rejected because of wrong authentication. > > > > > > 3 - I connected a monitor directly to the PI and it will not accept > > > the pi password when I try to login to X11 - but DOES accept the > > > root password. So X11 is OK, but only for root - not the regular pi > > > user. > > > > > > > > > > > Not a Pi expert so I'll answer this as if it was a generic Linux > > question... > > > > 1. You didn't mention if you tried to simply reset the pi user > > password from root by invoking 'passwd pi'? > > > > 2. Assuming SSH authentication via public key (I have to assume > > because I couldn't find the authentication method in the > > question...), one has to make sure that the home directory of the > > user authenticating to is with not-too-open permissions (for starters > > the safest bet is chmod 700), likewise for all all ancestor > > directories of said home directory, because if they're too open, > > another user might be able to simply replace your homedir with > > another homedir, and then log in as you; To discourage such > > possibility, SSH blocks authentication whenever the permissions are > > too wide. > > > > 3. If all the above fails (or you already tried and everything is in > > order), I would look at /var/log/messages (or Pi equivalent) while > > attempting to login to the user, to see if any hint is available > > there. Also, over ssh, using 'ssh -v' might output something useful. > > > > HTH, > > > > -- Shimi > > Thanks, but the problem is not the pi password or ssh. I CAN login over > ssh, but do not get X11. And this is exactly what happens when I > connect a monitor and keyboard directly to the PI. > > Just in case, I added -v to the ssh command as you suggested and here > are the last few lines of the output: > > debug1: Next authentication method: password > pi@pi's password: > debug1: Authentication succeeded (password). > Authenticated to pi ([10.0.0.51]:22). > debug1: channel 0: new [client-session] > debug1: Requesting no-more-sessi...@openssh.com > debug1: Entering interactive session. > debug1: Requesting X11 forwarding with authentication spoofing. > > The programs included with the Debian GNU/Linux system are free > software; the exact distribution terms for each program are described > in the individual files in /usr/share/doc/*/copyright. > > Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent > permitted by applicable law. > Last login: Sun Feb 4 11:25:07 2018 > debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384 > debug1: client_request_x11: request from ::1 36814 > debug1: channel 1: new [x11] > debug1: confirm x11 > X11 connection rejected because of wrong authentication. > debug1: channel 1: free: x11, nchannels 2 > > > > > > -- > Shlomo Solomon > http://the-solomons.net > Claws Mail 3.11.1 - KDE 4.14.30 - Dolphin 4.14.3 - LINUX Mageia 5 > > ___ > Linux-il mailing list > Linux-il@cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: raspberry PI - no X11
On Sun, 4 Feb 2018 12:26:41 +0200 shimiwrote: > On Sun, Feb 4, 2018 at 11:54 AM, Shlomo Solomon > wrote: > > > I really don't know how I screwed this up, but I've been "playing" > > with this for hours with no success. > > > > I have a raspberry PI file server. I rarely use the GUI and when I > > do it's usually over VNC (I use KRDC) or with ssh -X. > > > > As of today: > > 1 - KRDC won't connect > > > > 2 - ssh -X pi@pi (pi is defined in /etc/hosts) gives only a > > console login and says: > > X11 connection rejected because of wrong authentication. > > > > 3 - I connected a monitor directly to the PI and it will not accept > > the pi password when I try to login to X11 - but DOES accept the > > root password. So X11 is OK, but only for root - not the regular pi > > user. > > > > > > > Not a Pi expert so I'll answer this as if it was a generic Linux > question... > > 1. You didn't mention if you tried to simply reset the pi user > password from root by invoking 'passwd pi'? > > 2. Assuming SSH authentication via public key (I have to assume > because I couldn't find the authentication method in the > question...), one has to make sure that the home directory of the > user authenticating to is with not-too-open permissions (for starters > the safest bet is chmod 700), likewise for all all ancestor > directories of said home directory, because if they're too open, > another user might be able to simply replace your homedir with > another homedir, and then log in as you; To discourage such > possibility, SSH blocks authentication whenever the permissions are > too wide. > > 3. If all the above fails (or you already tried and everything is in > order), I would look at /var/log/messages (or Pi equivalent) while > attempting to login to the user, to see if any hint is available > there. Also, over ssh, using 'ssh -v' might output something useful. > > HTH, > > -- Shimi Thanks, but the problem is not the pi password or ssh. I CAN login over ssh, but do not get X11. And this is exactly what happens when I connect a monitor and keyboard directly to the PI. Just in case, I added -v to the ssh command as you suggested and here are the last few lines of the output: debug1: Next authentication method: password pi@pi's password: debug1: Authentication succeeded (password). Authenticated to pi ([10.0.0.51]:22). debug1: channel 0: new [client-session] debug1: Requesting no-more-sessi...@openssh.com debug1: Entering interactive session. debug1: Requesting X11 forwarding with authentication spoofing. The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sun Feb 4 11:25:07 2018 debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384 debug1: client_request_x11: request from ::1 36814 debug1: channel 1: new [x11] debug1: confirm x11 X11 connection rejected because of wrong authentication. debug1: channel 1: free: x11, nchannels 2 -- Shlomo Solomon http://the-solomons.net Claws Mail 3.11.1 - KDE 4.14.30 - Dolphin 4.14.3 - LINUX Mageia 5 ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: raspberry PI - no X11
On Sun, Feb 4, 2018 at 11:54 AM, Shlomo Solomonwrote: > I really don't know how I screwed this up, but I've been "playing" with > this for hours with no success. > > I have a raspberry PI file server. I rarely use the GUI and when I do > it's usually over VNC (I use KRDC) or with ssh -X. > > As of today: > 1 - KRDC won't connect > > 2 - ssh -X pi@pi (pi is defined in /etc/hosts) gives only a console > login and says: > X11 connection rejected because of wrong authentication. > > 3 - I connected a monitor directly to the PI and it will not accept the > pi password when I try to login to X11 - but DOES accept the root > password. So X11 is OK, but only for root - not the regular pi user. > > > Not a Pi expert so I'll answer this as if it was a generic Linux question... 1. You didn't mention if you tried to simply reset the pi user password from root by invoking 'passwd pi'? 2. Assuming SSH authentication via public key (I have to assume because I couldn't find the authentication method in the question...), one has to make sure that the home directory of the user authenticating to is with not-too-open permissions (for starters the safest bet is chmod 700), likewise for all all ancestor directories of said home directory, because if they're too open, another user might be able to simply replace your homedir with another homedir, and then log in as you; To discourage such possibility, SSH blocks authentication whenever the permissions are too wide. 3. If all the above fails (or you already tried and everything is in order), I would look at /var/log/messages (or Pi equivalent) while attempting to login to the user, to see if any hint is available there. Also, over ssh, using 'ssh -v' might output something useful. HTH, -- Shimi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
raspberry PI - no X11
I really don't know how I screwed this up, but I've been "playing" with this for hours with no success. I have a raspberry PI file server. I rarely use the GUI and when I do it's usually over VNC (I use KRDC) or with ssh -X. As of today: 1 - KRDC won't connect 2 - ssh -X pi@pi (pi is defined in /etc/hosts) gives only a console login and says: X11 connection rejected because of wrong authentication. 3 - I connected a monitor directly to the PI and it will not accept the pi password when I try to login to X11 - but DOES accept the root password. So X11 is OK, but only for root - not the regular pi user. What am I missing? -- Shlomo Solomon http://the-solomons.net Claws Mail 3.11.1 - KDE 4.14.30 - Dolphin 4.14.3 - LINUX Mageia 5 ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il