Im using the command ssh host@ip.ip.ip.ip "sudo -S dd if=/dev/mmcblk0 ...
to backup a RaspberryPis SD card while its running through ssh.
I don’t want to change anything on the RPi (like e.g. sudoers) and if i do not use the option -S i get the well known issue that no TTY or askpass is defined.
I also tried to set the SUDO_ASKPASS env. variable which did not lead to success
Thats why im glad that the upper version with using sudo -S is working because it asks me for the sudo password, which is then provided via stdin
The problem is, that the backup through ssh takes a long time which means that the “not-hidden” password i typed in can be seen on my screen for a very long time