I can login to my sudo account on CentOS 5.11 VPS (through the ssh keys) , but I have to reset root password and sudo user passwords (any of these two). Is it possible and how?
If you don't know the current password for the sudo user or the current root password and you don't have console access or some other web panel way to change the root password then you're screwed and should contact your service provider's support.
Yes, once you're connected as root, type
passwd root, it will prompt you for the new password, and ask for a confirmation of it.
After that the new password is the one you've type.
For sudo passwd, it's actually the user password itself, you will in this case need to change the user passwd, for example to change user "test" password, type as root
Use the passwd program (as root):
Just replace $username with the desired username.
It will ask you for the new password and change it in the system ( /etc/shadow ).