RE: Some users locked out of ssh and sftp?

Ray Olszewski
2005-03-14T19:45:14Z

I have to think about the message in general, but I wanted to correct one
small error in your procedure right away.

At 02:17 PM 3/14/2005 -0500, Eve Atley wrote:
[...]
>So I tried copying one of these known_hosts to /home/keyur/.ssh/known_hosts.
>When I next try a locate for known_hosts, keyur never actually appears in
>the listing.

The command "locate" checks a database on the system and, by taking that
approach, can respond VERY quickly. But the database is updated as a batch
job ("updatedb") run through cron, usually whenever cron.daily runs
(between 6 and 7 AM local time is typical ... mine runs at 6:25). So right
after you make a change, it will not show up in "locate" searches.

To detect new files immediately after creation, use the "find" command
instead. It actually walks the filesystem tree to find matches (so is
slower but more current). Example usage:

find / -name known_hosts

The man page is pretty clear on usage options; the only tricky thing is the
need, sometimes, to enclose wildcarded filespecs in quotes.