diff options
| author | Shulhan <ms@kilabit.info> | 2023-09-27 10:17:16 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-09-27 10:17:16 +0700 |
| commit | fa2510a8d458dc6d66d7df6e6ac94365553c248a (patch) | |
| tree | ebbf68c34b611e774eb00841a66526c933359107 /lib/ssh/client.go | |
| parent | 8d0720f6f9406262868e2efa0d757ec27ef7119d (diff) | |
| download | pakakeh.go-fa2510a8d458dc6d66d7df6e6ac94365553c248a.tar.xz | |
lib/ssh: fix missing error check from previous changes 8d0720f6
Diffstat (limited to 'lib/ssh/client.go')
| -rw-r--r-- | lib/ssh/client.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssh/client.go b/lib/ssh/client.go index 0f1ed680..420170c1 100644 --- a/lib/ssh/client.go +++ b/lib/ssh/client.go @@ -111,7 +111,7 @@ func NewClientInteractive(section *config.Section) (cl *Client, err error) { return cl, nil } - if strings.Contains(err.Error(), `knownhosts`) { + if err != nil && strings.Contains(err.Error(), `knownhosts`) { // Host key is either unknown or mismatch with one // of known_hosts files, so no need to continue with // dialWithPrivateKeys. |
