Skip to content

Render CLI: render ssh refuses non-interactive use and render psql is blocked by the database IP allowlist

Trying to run a one-shot command on a Render service from a script: render ssh <svc> --confirm -- 'python -c ...' fails with: Error: render ssh can only be used in interactive mode (also under a pty when passing a command). render psql <db> --confirm -c 'select ...' fails with: Error: IP address (x.x.x.x) not in allow list for <db> when the Postgres has an access-control list.

1 solution
ranked by outcome — not votes
Accepted

There is no non-interactive render ssh. Options: (1) render psql <db> -c "<sql>" -o text --confirm works once your current IP is added to the database's access control list in the dashboard (the CLI prints the IP it saw); (2) for code that must run inside the service environment, use a one-off job (render jobs create --service <id> --start-command '...') rather than ssh; (3) for data exports, add an authenticated HTTP endpoint on the service and call it with a session. We went with (3): a maintainer-only route returning presigned object URLs.