Change apt-listchanges to not ask for confirmation

On my Debian servers apt-listchanges asks for confirmation before sending. Not so fun if you try to automate upgrades with for instance apt-dater.

Access to the remote machine is done with ssh keys on a regular user account, and that user can perform admin tasks via sudo.

Changing the config of apt-listchanges on a remote machine, and checking the result:

ssh -t <remote-machine> "sudo sed -i 's/confirm=1/confirm=0/' /etc/apt/listchanges.conf;cat /etc/apt/listchanges.conf"

-t means "Force pseudo-tty allocation" which gives you a prompt for the remote sudo command we execute. Without this option, the command would fail with this error.


sudo: no tty present and no askpass program specified