Separate development from production
The agent should edit and test a local repository. SSH is used only for the final, reviewed deployment and verification steps.
- Do not install an autonomous coding agent as root on the production server.
- Do not share the hosting-panel administrator password with a coding tool.
- Do not reuse a personal SSH key that opens several servers.
- Do not keep a private key inside the website repository or public document root.
Create the smallest useful account
- Use the website-level SSH account supplied by Dprime or request a dedicated deployment user.
- Limit the account to the relevant website files and application processes.
- Use public-key authentication and generate a separate key pair for this deployment workflow.
- Add only the public key to the destination account.
- Keep the private key in a permission-restricted local file or approved secret store.
Important
Enhance runs website-level processes and SSH sessions inside the website's isolated container. The exact capabilities still depend on the hosting package and assigned website permissions.
Test access before automating
- Connect interactively using the hostname, port, username and private-key file.
- Confirm the remote working directory belongs to the intended website.
- Confirm the account cannot read another website or system configuration.
- Run read-only checks for the runtime, storage and current release.
- Upload a harmless temporary file outside the public path, verify it and remove it.
Use an atomic release process
- Upload the release into a new uniquely named directory.
- Copy production environment configuration from the current release without displaying its contents.
- Install production dependencies and build inside the new release directory.
- Run database migrations only when they are backward compatible and backed up.
- Switch the active path only after the new release builds successfully.
- Run health checks and restore the previous release automatically if verification fails.
Maintain the deployment credential
- Name the key so its purpose and owner are clear.
- Remove the public key when the tool, device or contractor no longer needs access.
- Rotate the key after suspected exposure or a change of responsibility.
- Review server authentication logs after unexpected deployment activity.
Official references
Platforms and tools change over time. Use these official references for the current product documentation.