open terminal and enter below command
ssh-keygen -t rsa
Follow prompt to provide passphrase and destination to store private, public keys.
It creates two files
Use public key(*.pub content) to create Virtual Machine as in below link..
Login to machine using ssh_key file
ssh -i ssh_key email@example.com
Enter passphrase to finish login process...