ssh-keygen -C "email"
# you can use different settings
# ssh-keygen -t ed25519 -C "your_email@example.com"
# ssh-keygen -t rsa ...
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
# add the public key to remote
cat ~/.ssh/id_ed25519.pub | ssh <user>@<remote> 'cat >> ~/.ssh/authorized_keys'
# OR
ssh-copy-id -i ~/.ssh/id_ed25519.pub <user>@<remote>