forked from toolshed/docs.coopcloud.tech
		
	chaotic ssh guide
This commit is contained in:
		| @ -10,4 +10,4 @@ Once you've got `abra` installed, you can start your own Co-op Cloud deployment. | ||||
| - [Quick start](/abra/quickstart): You're ready to get started using `abra` :muscle: | ||||
| - [Upgrade](/abra/upgrade): You're looking for instructions on how to upgrade `abra` :arrow_heading_up: | ||||
| - [Hack](/abra/hack): You wan to hack on `abra` and help out with the development :woman_construction_worker: | ||||
| - [Troubleshoot](/abra/troubleshoot): `abra` ain't working and you'd like to know why :boom: | ||||
| - [Troubleshoot](/abra/trouble): `abra` ain't working and you'd like to know why :boom: | ||||
|  | ||||
| @ -6,13 +6,49 @@ title: Troubleshoot | ||||
|  | ||||
| You can use [this issue tracker](https://git.coopcloud.tech/coop-cloud/abra/issues/new). | ||||
|  | ||||
| ## I'm having a bad day, where do I find a human? | ||||
|  | ||||
| Please see [the contact page](/intro/contact). | ||||
|  | ||||
| ## SSH connection issues? | ||||
|  | ||||
| TODO. | ||||
| `abra` tries its best to learn from your system configuration or command-line input what the correct SSH connection details are for a given server. This doesn't always work out. Here are some things to try to fix it. | ||||
|  | ||||
| First, ensure that you can `ssh <my-server>` and things work. If you can't SSH to your server then neither can `abra`. If you have a password protected SSH key, then you'll need to make sure your `ssh-agent` is running and you've added your SSH key part: | ||||
|  | ||||
| ``` | ||||
| eval $(ssh-agent -k) | ||||
| ssh-add ~/.ssh/<my-secret-key-part> | ||||
| ssh-add -L # validate loaded keys | ||||
| ``` | ||||
|  | ||||
| The first thing `abra` will check for is the connection details listed in `abra server ls`. Check those details are correct. If you haven't managed to `abra server add` your server yet, then no details will appear in that list. | ||||
|  | ||||
| `abra` will then try to read your `~/.ssh/config` entries and match the server domain against a `Host` entry. So, if you do `ssh myserver.com` and you have: | ||||
|  | ||||
| ``` | ||||
| Host myserver.com | ||||
|   Hostname myserver.com | ||||
|   User myuser | ||||
|   Port 222 | ||||
|   IdentityFile ~/.ssh/my@myserver.com | ||||
| ``` | ||||
|  | ||||
| Then `abra` should have all it needs to build a working SSH connection. You can validate this by passing `-d/--debug` to your commands. | ||||
|  | ||||
| However, sometimes, you use an alias in your SSH configuration, say: | ||||
|  | ||||
| ``` | ||||
| Host mys | ||||
| ... | ||||
| ``` | ||||
|  | ||||
| So that you can simply type `ssh mys`. `abra` won't be able to match against those entries to discover connection details. You can use aliases to remedy this: | ||||
|  | ||||
| ``` | ||||
| Host mys, myserver.com | ||||
| ... | ||||
| ``` | ||||
|  | ||||
| `abra` will try to read the relevant `IdentityFile` entry from your `~/.ssh/config` but if it can't make a match, it will rely on your key being added to the `ssh-agent`. | ||||
|  | ||||
| Due to a limitation in our implementation, `abra` uses 2 methods of making SSH connections, the main `abra` -> `remote docker` connection using `/usr/bin/ssh` which can seamlessly pick up loaded SSH keys. However, for SSH host key checking, `abra` uses an SSH library & Golang SSH internals. We're working on resolving this to a single implementation but it is tricky work. | ||||
|  | ||||
| ## "abra server ls" shows the wrong details? | ||||
|  | ||||
| @ -30,4 +66,4 @@ docker context create <domain> --docker "host=ssh://<user>@<domain>:<port>" | ||||
|  | ||||
| ## Command-line flag handling is weird? | ||||
|  | ||||
| TODO. | ||||
| Unfortunately, there is a limitation in our underlying command-line library implementation for `abra` ([ref](https://github.com/urfave/cli/issues/1113)) (and more fundamentally in the design of flags in the Go programming language itself ([ref](https://utcc.utoronto.ca/~cks/space/blog/programming/GoFlagUIImportance))). We're aiming to work with upstream to resolve the flag handling but this it is not yet clear when this will be resolved. | ||||
|  | ||||
		Reference in New Issue
	
	Block a user