If missing ~/.ssh/known_hosts entry for host, abra app ls explodes #234

Closed
opened 2021-11-05 09:05:09 +00:00 by decentral1se · 3 comments
Owner

Describe the current behavior

abra app ls -S explodes with 15 ssh host key checks.

Steps to reproduce

rm ~/.ssh/known_hosts && abra app ls -S

Describe the expected behavior

It works. Servers get listed.

Any idea how this might be fixed?

I think we need to teach abra itself how to do host key checks or potentially more unstable, pass no host key check option when making SSH connections and warn folks that this is the case.

## Describe the current behavior `abra app ls -S` explodes with 15 ssh host key checks. ## Steps to reproduce `rm ~/.ssh/known_hosts && abra app ls -S` ## Describe the expected behavior It works. Servers get listed. ## Any idea how this might be fixed? I think we need to teach `abra` itself how to do host key checks or potentially more unstable, pass no host key check option when making SSH connections and warn folks that this is the case.
decentral1se added this to the Command-line tool sustainability milestone 2021-11-05 09:05:09 +00:00
decentral1se added the
bug
abra
labels 2021-11-05 09:05:09 +00:00
decentral1se added this to the Beta release (software) project 2021-11-05 09:05:09 +00:00
Author
Owner

Also related: #142

Also related: https://git.coopcloud.tech/coop-cloud/organising/issues/142
Author
Owner

This does make it all Just Work ™️

This would be easiest for us....

Will investigate making abra manage host key checking itself also.

diff --git a/pkg/upstream/commandconn/connection.go b/pkg/upstream/commandconn/connection.go
index 46dfc83..ecbc5d6 100644
--- a/pkg/upstream/commandconn/connection.go
+++ b/pkg/upstream/commandconn/connection.go
@@ -19,7 +19,7 @@ import (
 //
 // ssh://<user>@<host> URL requires Docker 18.09 or later on the remote host.
 func GetConnectionHelper(daemonURL string) (*connhelper.ConnectionHelper, error) {
-       return getConnectionHelper(daemonURL, []string{"-o ConnectTimeout=5"})
+       return getConnectionHelper(daemonURL, []string{"-o ConnectTimeout=5", "-o StrictHostKeyChecking=no"})
 }
 
 func getConnectionHelper(daemonURL string, sshFlags []string) (*connhelper.ConnectionHelper, error) {
This does make it all Just Work ™️ This would be easiest for us.... Will investigate making `abra` manage host key checking itself also. ```diff diff --git a/pkg/upstream/commandconn/connection.go b/pkg/upstream/commandconn/connection.go index 46dfc83..ecbc5d6 100644 --- a/pkg/upstream/commandconn/connection.go +++ b/pkg/upstream/commandconn/connection.go @@ -19,7 +19,7 @@ import ( // // ssh://<user>@<host> URL requires Docker 18.09 or later on the remote host. func GetConnectionHelper(daemonURL string) (*connhelper.ConnectionHelper, error) { - return getConnectionHelper(daemonURL, []string{"-o ConnectTimeout=5"}) + return getConnectionHelper(daemonURL, []string{"-o ConnectTimeout=5", "-o StrictHostKeyChecking=no"}) } func getConnectionHelper(daemonURL string, sshFlags []string) (*connhelper.ConnectionHelper, error) { ```
Author
Owner
> https://skarlso.github.io/2019/02/17/go-ssh-with-host-key-verification/
Sign in to join this conversation.
No Assignees
1 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#234
No description provided.