SSH Config not recognized #345

Closed
opened 2022-08-16 09:50:21 +00:00 by xeruf · 5 comments
DEBU[0000] constructed SSH config {go.DOMAIN   janek} for go.DOMAIN  caller="/home/janek/.local/cache/yay/abra-git/src/go-abra/pkg/ssh/ssh.go:523 GetHostConfig"
[...]
Abra isn't picking up your SSH configuration or you need to specify it on the
command-line (e.g you use a non-standard port or username to connect). Run
"server add" with "-d/--debug" to learn more about what Abra is doing under the
hood.

Well, I have an entry like this in my ssh config:

Match host *.DOMAIN
  User root
  IdentityFile ~/.ssh/keys/vm

Which is apparently not recognized.
Why does Abra not use ssh directly, though, which would avoid these issues?

```sh DEBU[0000] constructed SSH config {go.DOMAIN janek} for go.DOMAIN caller="/home/janek/.local/cache/yay/abra-git/src/go-abra/pkg/ssh/ssh.go:523 GetHostConfig" [...] Abra isn't picking up your SSH configuration or you need to specify it on the command-line (e.g you use a non-standard port or username to connect). Run "server add" with "-d/--debug" to learn more about what Abra is doing under the hood. ``` Well, I have an entry like this in my ssh config: ```sh Match host *.DOMAIN User root IdentityFile ~/.ssh/keys/vm ``` Which is apparently not recognized. Why does Abra not use ssh directly, though, which would avoid these issues?
xeruf added the
bug
abra
labels 2022-08-16 09:50:21 +00:00
Author

It does not even recognize a config like this, staying with the wrong username, the heck?

Host go.DOMAIN
  User root
  IdentityFile ~/.ssh/keys/vm

But specifying abra server add root@go.DOMAIN also ignores the given user.

Finally, at least it tries to connect but the error message is very cryptic considering the actual error is simply Permission denied.

❯ abra server add go.DOMAIN -d
[...]
DEBU[0003] FIXME: Got an status-code for which error does not match any expected type!!!  caller="/home/janek/.local/state/go/pkg/mod/github.com/docker/docker@v20.10.17+incompatible/errdefs/http_helpers.go:39 FromStatusCode" error="error during connect: Get \"http://docker.example.com/v1.24/info\": command [ssh -o ConnectTimeout=5 -l janek -p 22 -- go.DOMAIN docker system dial-stdio] has exited with exit status 255, please make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=janek@go.DOMAIN: Permission denied (publickey).\r\n" module=api status_code=-1
It does not even recognize a config like this, staying with the wrong username, the heck? ```sh Host go.DOMAIN User root IdentityFile ~/.ssh/keys/vm ``` But specifying `abra server add root@go.DOMAIN` also ignores the given user. Finally, at least it tries to connect but the error message is very cryptic considering the actual error is simply `Permission denied`. ```sh ❯ abra server add go.DOMAIN -d [...] DEBU[0003] FIXME: Got an status-code for which error does not match any expected type!!! caller="/home/janek/.local/state/go/pkg/mod/github.com/docker/docker@v20.10.17+incompatible/errdefs/http_helpers.go:39 FromStatusCode" error="error during connect: Get \"http://docker.example.com/v1.24/info\": command [ssh -o ConnectTimeout=5 -l janek -p 22 -- go.DOMAIN docker system dial-stdio] has exited with exit status 255, please make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=janek@go.DOMAIN: Permission denied (publickey).\r\n" module=api status_code=-1 ```
Owner

Why does Abra not use ssh directly, though, which would avoid these issues?

abra does use SSH directly, I just don't think it can handle glob style matches on the Host entry in the ssh config...

It does not even recognize a config like this, staying with the wrong username

Do you have any logs for this? Maybe it was considering an invalidly created docker context at this stage (can validate with abra server ls.

But specifying abra server add root@go.DOMAIN also ignores the given user.

Should be abra server add go.DOMAIN root?

Finally, at least it tries to connect but the error message is very cryptic considering the actual error is simply Permission denied.

Ah yes, this could definitely be improved.

> Why does Abra not use ssh directly, though, which would avoid these issues? `abra` does use SSH directly, I just don't think it can handle glob style matches on the Host entry in the ssh config... > It does not even recognize a config like this, staying with the wrong username Do you have any logs for this? Maybe it was considering an invalidly created docker context at this stage (can validate with `abra server ls`. > But specifying abra server add root@go.DOMAIN also ignores the given user. Should be `abra server add go.DOMAIN root`? > Finally, at least it tries to connect but the error message is very cryptic considering the actual error is simply Permission denied. Ah yes, this could definitely be improved.
Author

Yep, made it work with abra server add go.DOMAIN root but I would expect it to pickup the SSH config, which should not be an issue if the ssh cli would be used directly.

Yep, made it work with `abra server add go.DOMAIN root` but I would expect it to pickup the SSH config, which should not be an issue if the `ssh` cli would be used directly.
Owner

which should not be an issue if the ssh cli would be used directly.

Yeh need to look again at the pros/cons of this internal SSH implementation. May have gone a bit drunk on binary bundling power trying to (questionably) avoid a bog-standard sysadmin tool (openssh-client).

Memory is fuzzy but it was a bit of a software spike after dropping the Docker CLI dependency that never really finished up cleanly. Hence these kind of reports and others on this issue tracker.

> which should not be an issue if the ssh cli would be used directly. Yeh need to look again at the pros/cons of this internal SSH implementation. May have gone a bit drunk on binary bundling power trying to (questionably) avoid a bog-standard sysadmin tool (openssh-client). Memory is fuzzy but it was a bit of a software spike after dropping the Docker CLI dependency that never really finished up cleanly. Hence these kind of reports and others on this issue tracker.
decentral1se added this to the (deleted) project 2022-10-22 12:29:23 +00:00
3wordchant modified the project from (deleted) to (deleted) 2023-01-11 16:15:21 +00:00
3wordchant modified the project from (deleted) to Federation & abra fixes 2023-01-11 16:17:49 +00:00
Owner

Merging into #380

Merging into https://git.coopcloud.tech/coop-cloud/organising/issues/380
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#345
No description provided.