Sir before that I explain for you and now I want to tell you step by step and hope that solves your problem follow below instruction
1- #mkdir ~/.ssh (if you don't have it)
2- #ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa
3- #Enter passphrase (empty for no passphrase)
4- #chmod 700 ~/.ssh
5- #chmod 600 ~/.ssh/*
6- (((This step is run on your local computer. Upload your public key to your server. The command below reads the content of the key you just created on your computer, and appends that key to the authorized_keys file on your server. If you don't have an existing authorized_keys file, it creates one. Replace example.com with your domain:)))
#cat ~/.ssh/id_rsa.pub | ssh email@removed 'cat - >> ~/.ssh/authorized_keys'
7-(((This step is run on your remote server. Make sure your .ssh directory on the server, and the files it contains, have the correct
permissions)))
#chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh/
8- for trouble shooting On your remote server, run the following #ls -la ~/.ssh | grep "authorized_keys"
and you must see authorized_keys here9-Finally, run this command to check the permissions on your .ssh directory:

#ls -la ~ | grep ".ssh"

and you must same is below in your output drwx------ 2 example.comexample.com 3 Jul 15 10:32 .ssh
good luck (follow step by step and be sure that's done in every part)