You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought subprocess-tee would fit in nicely for the following example
fromsubprocess_teeimportruno=run("ssh remotehost -t sudo cat /super/secret/file"))
# now trim of the password prompt from o
i.e. someone running my python script should see the sudo password prompt from the remote host, and I can capture the cat output in a local variable (i don't want my users to blindly type their sudo passwords, assuming the ssh connection got established, though they still have to trust me that i'm not doing anything nasty with the password). yet, this doesn't work as desired because there is no linefeed after [sudo] password for <user>: and the prompt only becomes printed by subprocess-tee after the user hits return.
The text was updated successfully, but these errors were encountered:
I thought subprocess-tee would fit in nicely for the following example
i.e. someone running my python script should see the sudo password prompt from the remote host, and I can capture the
cat
output in a local variable (i don't want my users to blindly type their sudo passwords, assuming the ssh connection got established, though they still have to trust me that i'm not doing anything nasty with the password). yet, this doesn't work as desired because there is no linefeed after[sudo] password for <user>:
and the prompt only becomes printed by subprocess-tee after the user hits return.The text was updated successfully, but these errors were encountered: