upvote
Background: I use OpenCode to do this.

Just tell it to use ssh from the shell. From there you can give it extra context to describe the target (if you know/care about it), or just let it loose and if the environment doesn't have what it expects it will "figure something out" - just the same as with your local env.

If there's some least common denominator you know about e.g. python it can streamline things if you tell it to just use that for everything.

reply
> i would not trust bash execution of SSH because it can easily hallucinate local commands instead of remote.

Why would it be more likely to hallucinate local commands instead of remote commands if it is in an active SSH session?

reply