~$ ssh-keygen -t ed25519 -f mydokey
Generating public/private ed25519 key pair.
Enter passphrase (empty for no passphrase): meinepassphrase
Enter same passphrase again: meinepassphrase
Your identification has been saved in mydokey.
Your public key has been saved in mydokey.pub.
The key fingerprint is:
SHA256:z1sfDIpM1cRqrH0rsPN16FPpJDm9bcVF2v1o6aHB0kE vagrant@ubuntu
 
~$ doctl compute ssh-key import mydokey --public-key-file mydokey.pub
ID          Name       FingerPrint
26743332    mydokey    2c:2c:67:4c:f9:1f:e6:08:09:81:ec:9c:0b:7e:6d:e1
