Codex Remote SSH fails if RemoteCommand field included in SSH config

Open 💬 0 comments Opened Apr 17, 2026 by b4rlw

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.415.21839 (1763)

What subscription do you have?

Business

What platform is your computer?

Darwin 25.4.0 arm64 arm

What issue are you seeing?

~/.ssh/config:

Host my-host
  RemoteCommand sudo -iu user

In Codex app Settings->Connections, the status of the my-host entry is:

Error
Cannot execute command-line and remote command.

What steps can reproduce the bug?

Include RemoteCommand in a config block in ~/.ssh/config.
In my case, I am trying to switch user, but the failure mode can be reproduced with any command.
For example, RemoteCommand echo "test" still fails.

What is the expected behavior?

Connection succeeds.

Additional information

_No response_

View original on GitHub ↗