0

My GCE instance has suddenly started asking for a password when using sudo, no idea what has changed

Like this: Google Cloud VM when sudoing asks for password

However I really don't want to use the provided solution of deleting and recreating my instance, there must be a simple way to prevent sudo asking for a password?

Sunny J
  • 453
  • 2
  • 14

2 Answers2

0

You may be able to do something like in this post

Don't forget to make a copy of this file before editing and to try the connection in a private tab to test asap after update.

Having to type a password after a sudo seems to be a good security to have, so do it at your own risks.

ThisIsMyName
  • 887
  • 7
  • 14
-1

Ah OK, I was being stupid. My SSH keys had an expiry date and that was why sudo was asking for a password. Just change expiry date and everything works again.