From 9648fe8ab9145bbda303e541283bdf7c1951a3a3 Mon Sep 17 00:00:00 2001 From: Andrew Woodlee Date: Mon, 2 Jan 2023 17:50:40 -0600 Subject: [PATCH] debug --- pkg/backy/ssh.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/backy/ssh.go b/pkg/backy/ssh.go index d47dd9d..4a7356e 100644 --- a/pkg/backy/ssh.go +++ b/pkg/backy/ssh.go @@ -141,10 +141,9 @@ func getHostKey(host string) ssh.PublicKey { if len(fields) != 3 { continue } - for _, field := range fields { - log.Println(field) - } - if strings.Contains(fields[0], base64.StdEncoding.EncodeToString([]byte(host))) { + log.Printf("Field[3]: %s ", fields[3]) + log.Printf("Base-64 of %s: %s", host, base64.StdEncoding.EncodeToString([]byte(host))) + if strings.Contains(fields[3], base64.StdEncoding.EncodeToString([]byte(host))) { var err error hostKey, _, _, _, err = ssh.ParseAuthorizedKey(scanner.Bytes()) if err != nil {