Various changes to work with ssh agent and existing files/databases.