You will rarely need to SSH directly into your cloud environments, but occasionally it can be useful.
You can get an SSH connection details from the appropriate server pane in the Control Panel:
- If your server (Test or Live) has not yet been deployed, deploy it now - you will need to deploy it before you can reach it via SSH.
- In the Dashboard for your project select and copy the SSH command from the Test or Live server panel.
- Paste the command into your terminal application.
An instance of your web application will be spun up in a new container, and after a moment you'll be logged in to it as root.
The container you're connected to will not be one actually serving your site on the web, but a new one that uses the same configuration, database and so on.
SSH sessions are limited to 30 minutes, regardless of any activity.
Any files you create or change on this instance will not affect those on any other containers.
Also, each session is isolated from any other extant processes (web processes, workers, other shell sessions).
If your site's cache relies on the database (the Divio Cloud Projects default) then your container will be able to make use of it, clear it and so on.
However, if you're using for example a locmem cache, it will not be available to your container.