ssh config file using your preferred editor I am going to install vim. You will need root access to do this operation.
Then find the line with
PasswordAuthentication and change the line as below
If you want to turn off the password authentication then you can just commented out the whole line (as the password authentication is off by default) or you can set
After you finish editing you can save the file then restart the `ssh` service using the command
service sshd restart