Enable SSH key login and disable password login
I created a centos vps and since i created that on phone, I enabled password login and did not specify any ssh key.
Now I am trying to update the config in /etc/ssh/sshd_config to disable password login and enable key based login but the config changes are not getting reflected. I am not able to login with public key.
I added a user with sudo permission. for that user, I added the key in .ssh/authorized_keys file. but ssh user@ip always asks for password.
Can someone please suggest on this what I am doing wrong or is sshd config not updatable once vps is created?