clean up and add ssh key function