Common up SSH key generation code