diff --git a/pyinfra/api/util.py b/pyinfra/api/util.py
index <HASH>..<HASH> 100644
--- a/pyinfra/api/util.py
+++ b/pyinfra/api/util.py
@@ -342,7 +342,7 @@ def make_command(
 
     # Use sudo (w/user?)
     if sudo:
-        sudo_bits = ['sudo', '-H']
+        sudo_bits = ['sudo', '-S', '-H']
 
         if preserve_sudo_env:
             sudo_bits.append('-E')
Pass `-S` to sudo to read from stdin.