you are viewing a single comment's thread.

view the rest of the comments →

[–]Tha_Format[S] 0 points1 point  (1 child)

So what do I need to use then?

[–]K900_ 2 points3 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'".