Fix bug in sshKey management