fix ssh keys mechanism, add the set default key function. NEEDS TESTING