By default sudo “remembers” your password, when you enter it.

This is very handy, when you are using a lot of commands with sudo.

There is a way to stop this behaviour if you are concerned about security. make sudo not to remember your password

But this way, you will have to enter it each time you invoke sudo again.

There is another security measure you can take. Once you have finished using sudo, tell it to forget your password.

sudo -K