When an Agent Server Is Unreachable: Separate Console, SSH, Git and Application Failures
Suppose my personal research assistant's page becomes unreachable and SSH also fails. It is tempting to replace keys, redeploy or loosen firewalls, but those actions address different failures. Start by locating the failing chain with read-only evidence.
| Observation | Check first | Does not establish |
|---|---|---|
| Cloud console requests reauthentication | Cloud account and management-plane authorization | Application stopped |
| SSH timeout | Instance, public endpoint, source and firewalls | Key must be wrong |
| Connection refused | Port, listening service and active rejection | Git repository failure |
| Permission denied (publickey) | SSH user, selected identity and instance binding | Public ports should be opened |
| SSH works but git fetch/push fails | Remote, Git identity and branch permission | Host key is invalid |
| HTTPS works but report is missing | Data source, migration and task state | Model should be rerun |
First evidence: where does the client connect?
Assume research-demo is a verified alias for your authorized test host:
ssh -G research-demo | awk '$1=="hostname" || $1=="user" || $1=="port"'
ssh -o BatchMode=yes -o ConnectTimeout=8 research-demo 'printf "ssh-ok\\n"'The first command shows effective configuration; the second tries an authorized noninteractive connection. Preserve host-key verification. If a host key changes, verify it through a trusted console rather than bypassing the check.
If SSH is unavailable, use the cloud provider's authorized console and recovery access to inspect the instance. Tencent Cloud users can consult its SSH login guide; use equivalent documentation on other hosts.
Second evidence: are the host and repository the intended objects?
After connecting to the correct authorized host and project directory, inspect read-only:
# On the authorized host
ss -lnt
docker compose ps
docker compose logs --tail=60 app
curl -fsS http://127.0.0.1:8080/health
git rev-parse HEAD
git remote get-url originLogs can contain sensitive content: do not paste them into a public issue. Check the listener, effective working directory and repository identity. Host login and Git credentials are independent; read access to a private repository does not establish push authorization.
If work has not been committed to a task branch, preserve approved changes in an accessible independent worktree and push normally. Do not overwrite remote history or copy production runtime directories into the source repository just to recover host connectivity.
After recovering access, verify the application
If loopback health works but public HTTPS fails, inspect proxy and DNS. If the process responds but readiness fails, inspect database and migrations. If both respond yet the report is missing, read back its original ID. Only repeat execution after identifying the recovery policy and previous task state.
No real host was operated for this example. It complements the first deployment exercise and the self-hosting and delivery-observability roadmap.