'gpasswd[29283]: user xxx removed by root from group google-sudoers

I added a user xxx for sFTP. The user uses SSH keys for authentication.

All works well for a period of time and suddenly the login failed. The log shows:

gpasswd[29283]: user xxx removed by root from group google-sudoers

No one removes this user xxx.

May I know what causes it and how to fix it?

I'm not sure if it is because the keys will be automatically deleted by Google Cloud? I tried to search for relevant information but to no avail.

--- Added Info: ---

I'm not using OS login..

Here is how I setup the user:

Generate key:ssh-keygen -t rsa -f ~/.ssh/userxxx -C userxxx
Copy and save the private key: sudo cat ~/.ssh/userxxx
Copy the public key:sudo cat ~/.ssh/userxxx.pub
Add the public key using the cloud console: Cloud Console > VM > Edit > SSH Keys

I tried to add the public key using the console again, it works briefly but it is removed automatically again.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source