diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in
index 6be4c45ebd5aaf2b79a89280d444aa6fe6631072..dcd863003602ff6db5feb51441b57885b86f9f1d 100755
--- a/scripts/build-remote.pl.in
+++ b/scripts/build-remote.pl.in
@@ -197,7 +197,7 @@ REQ: while (1) {
         $hostName = $machine->{hostName};
         last REQ if
             openSSHConnection($hostName) &&
-            system("ssh $hostName @sshOpts nix-builds-inhibited >/dev/null 2>&1") != 0;
+            system("ssh $hostName @sshOpts nix-builds-inhibited < /dev/null > /dev/null 2>&1") != 0;
 
         warn "unable to open SSH connection to $hostName, trying other available machines...\n";
         $machine->{enabled} = 0;