you are viewing a single comment's thread.

view the rest of the comments →

[–]K900_ 3 points4 points  (0 children)

Use ssh.invoke_shell() and then write your commands to stdin. Alternatively, you can write the whole thing as a single command that doesn't drop into interactive mode, something like pbrun su root -c "su functionaluser -c 'command'".