In a terminal, execute the following command
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
Copy the key to <HOME>/.ssh folder and set the right permissions
cp <key> ~/.ssh/id_rsa
chmod -R 700 ~/.ssh
For more details/steps follow this link: https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent