Fix ssh-copy-id function to be more generic