[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Logging off an X session closes all ssh -X connections started previously from outside X



On 2023-05-10 09:28:51 -0400, Greg Wooledge wrote:
> On Wed, May 10, 2023 at 03:19:31PM +0200, Vincent Lefevre wrote:
> > On 2023-05-10 15:07:17 +0200, Vincent Lefevre wrote:
> > > Note: if you play with .ssh/rc, be careful as there is a risk
> > > that you may not log in any more with ssh in case of mistake
> > > (I'm wondering whether there is an undocumented way to skip it).
> > 
> > For this point, there are solutions there:
> > 
> >   https://unix.stackexchange.com/q/458445/74516
> > 
> > But this needs to update the setup on the server first.
> 
> A sensible precaution when mucking around with things that could affect
> your account's login is to ensure there's a second account you can
> log into in case you break the first one.  Also, ensure that the second
> account can run either "sudo" or "su" or some other privilege elevation
> command, so that you can fix the first account from the second.
> 
> (Of course, if the second account is root, then no elevation is needed.)

For hosts where one is the admin, alternative ways are needed
(e.g. physical access or some form of console login), as even
ssh may break globally. A second account is not much useful in
such a case (unless user-level breakage is common).

For hosts where one isn't the admin, it is often not really
possible to have a second account. And the alternate key solution
described at the above URL is possible in such a case.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: