When running an SSH command that uses sudo, something like
ssh admin@192.168.1.20 "sudo apt -y update && sudo apt -y upgrade"
You may receive the following error.
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
To work around this, you can use the -t option. -q is not needed, but makes thing quieter.
ssh -qt admin@192.168.1.20 "sudo apt -y update && sudo apt -y upgrade "
The sudo password will also be hidden.