Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clever SSH to running instances - Troubleshooting section #514

Merged
merged 6 commits into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion content/doc/administrate/ssh-clever-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

## Access your application's folder

No matter wich way you've decided to use to SSH to the machine, your application's folder is located at: `/home/bas/<app_id>`.
No matter which way you've decided to use to SSH to the machine, your application's folder is located at: `/home/bas/<app_id>`.

Check notice on line 95 in content/doc/administrate/ssh-clever-tools.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/doc/administrate/ssh-clever-tools.md#L95

[Google.Passive] In general, use active voice instead of passive voice ('is located').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('is located').", "location": {"path": "content/doc/administrate/ssh-clever-tools.md", "range": {"start": {"line": 95, "column": 92}}}, "severity": "INFO"}

## Show your application's logs

Expand All @@ -103,3 +103,27 @@
```

You can also use `journalctl` [with other options](https://www.commandlinux.com/man-page/man1/journalctl.1.html) if you need to.

## Troubleshooting

A commonly encountered issue when using `clever ssh` is:
```
Error: Failed to choose instance: 'Error while running choice script: Error: This application has no instances you can ssh to'
```

First, make sure your application is running, otherwise there is no instance to connect to.

If your application is up, this means you aren't allowed to access the organization or application. This might be due to permission issue.
If you're supposed to have access to the application, this is likely due to a key management issue. To fix it:
* make sure you've added your public key on your Clever Cloud profile. You can refer to our documentation to [add your SSH key on Clever Cloud](../../account/ssh-keys-management#add-a-public-ssh-key-on-clever-cloud)

Check warning on line 118 in content/doc/administrate/ssh-clever-tools.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/doc/administrate/ssh-clever-tools.md#L118

[Google.We] Try to avoid using first-person plural like 'our'.
Raw output
{"message": "[Google.We] Try to avoid using first-person plural like 'our'.", "location": {"path": "content/doc/administrate/ssh-clever-tools.md", "range": {"start": {"line": 118, "column": 89}}}, "severity": "WARNING"}
* make sure your SSH agent is using the proper private key

A useful command for debugging is:
```
ssh -t [email protected] -v
```

This command shows information about your SSH connection attempt, such as the key, and the organization your key is linked to.

Check notice on line 126 in content/doc/administrate/ssh-clever-tools.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/doc/administrate/ssh-clever-tools.md#L126

[Google.Passive] In general, use active voice instead of passive voice ('is linked').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('is linked').", "location": {"path": "content/doc/administrate/ssh-clever-tools.md", "range": {"start": {"line": 126, "column": 114}}}, "severity": "INFO"}

If you don't see your SSH key listed, you must [add it to your SSH agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent).
If your key is present but not resolved as the first one in the list, you can [force the use of a specific key](../../account/ssh-keys-management/#configure-your-ssh-agent)
Loading