Bug 1401 - ssh does not remove staled credentials from .Xauthority
Summary: ssh does not remove staled credentials from .Xauthority
Status: NEW
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 4.7p1
Hardware: All Linux
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-12 07:31 AEDT by Anicka Bernathova
Modified: 2008-01-30 08:42 AEDT (History)
1 user (show)

See Also:


Attachments
patch for removing staled credentials in .Xauthority (1.07 KB, patch)
2007-12-12 07:31 AEDT, Anicka Bernathova
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.