Bug 1401

Summary: ssh does not remove staled credentials from .Xauthority
Product: Portable OpenSSH Reporter: Anicka Bernathova <anicka>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: NEW ---    
Severity: normal CC: djm
Priority: P2    
Version: 4.7p1   
Hardware: All   
OS: Linux   
Attachments:
Description Flags
patch for removing staled credentials in .Xauthority none

Description Anicka Bernathova 2007-12-12 07:31:43 AEDT
Created attachment 1395 [details]
patch for removing staled credentials in .Xauthority

ssh does not remove its entries in xauthority file and makes it grow. Lookup in too big a file might take lots of time, especially when the machine is not connected to the Internet or if the file stores hostnames that do not exist any more.

There are probably many ways how to fix this issue. I am attaching a patch for openssh 4.7p1 we are using in openSUSE, that attempts to address it.
Comment 1 Damien Miller 2008-01-20 11:52:41 AEDT
How does this work with session multiplexing? Wouldn't it be better to remove the creds once, when the server is finally closing?
Comment 2 Anicka Bernathova 2008-01-30 08:42:03 AEDT
It works with session multiplexing, at least as far as I have tested it. 

And as far as I understand it, it is done correctly, because every session, even the multiplexed one, does its X forwarding on its own.