#create an identity fil name {mycert} as per your need
ssh-keygen -f ~/.ssh/mycert -t ed25519

#/.ssh/config
Host myserver
Hostname {hostname}
IdentityFile ~/.ssh/{identityFile}
User {username}

#from the console
ssh myserver