I tried to test a maintenence script on Beta Cluster (ssh-ed into deployment-bastion.eqiad.wmflabs):
mwscript extensions/Flow/maintenance/FlowFixEditCount.php --wiki=enwiki
It prompts for my password, which of course I don't know.
It turns out (thanks @Krenair) that the workaround is:
sudo mwscript extensions/Flow/maintenance/FlowFixEditCount.php --wiki=enwiki
but this seems unnecessary (there is already logic in the script about doing sudo, so it should work).