Codex SSH Executor
Open 💬 4 comments Opened Jan 26, 2026 by samodadela
What feature would you like to see?
Feature request:
- Start codex locally with
codex --ssh user@example.com:/home/user/src - Codex run locally but all tools calls are executed on the remote host
This can be used as a kind of sandbox (if the remote host is configured correctly). If codex sandbox is not possible on remote --dangerously-bypass-approvals-and-sandbox could be made required so the user knows codex is in YOLO mode on the ssh host.
Pros:
- copying images in codex would finally work ;) (as you know pasting images won't work via ssh)
- if the remote host is properly configured (no credentials, no egress) user can feel safer nothing bad can happen
- other agents don't have this ;)
Additional information
_No response_
4 Comments
@samodadela just asking codex to connect to the ssh to perform anything there doesn't cover this yet?
You just have to convince that ssh is available on the machine and that the network access is available to connect to the remote host, Codex takes care of the rest.
No. Because it then also has access on the host. I don't want it to see the host at all - the tools should hide it from him.
Any tool invocation should operate within the container.
The tools are probably the easy part. Problem is with MCPs.
So maybe a better solution would be to run codex fully in the container and have the CLI console connect to it.
In the container it would need access to the server, though.
Just thinking out loud.
in the meanwhile you can consider using my codex plugin in codex app: https://github.com/bugparty/codex-ssh-plugin