Fix to run a GN Passive install command with sudo without pty and over ssh.
The old logic did not work on Ubuntu. Hence the fix.