By default, when you run the sudo command on Ubuntu, you will need to enter your password. You can disable this by updating your sudo configuration. You may want to do this if you enable logging in via SSH key.
sudo visudo
username ALL=(ALL) NOPASSWD: ALL
Now you will no longer be prompted for a password when running sudo.