Protect ssh key edits with a mutex and lock file.