Closed git-os closed 11 months ago
Yes intended behavior. srv
is a string (the return result of sh.ssh
). What you're trying to do, as simple as it appears conceptually, is very advanced. You'll need to use a different library for running remote processes.
Got it, maybe you could give me advice about implementation. Currently I have a function, that pretty much gets a binary along with its args (including potentially included _in special kwargs), and then forms a baked command for execution at a later time. Could I use contrib wrapping somehow to maybe execute the first level (remote) Command and then have a follow up function passing the result of it to the _in defined command and execute it locally, then return the result?
Keeping SSH connections open and running remote commands on a server is outside the scope of sh. It's not that it can't be done, but sh doesn't provide any help besides running commands locally and collecting the output. If you want to automate remote execution of commands, a tool like Fabric is a better choice.
ok, thanks
works fine but none of these seem to work
is this intended behaviour because it is not supported?