This commit is contained in:
Andrew Woodlee 2023-01-02 17:50:40 -06:00
parent 14650c4db1
commit 9648fe8ab9

View File

@ -141,10 +141,9 @@ func getHostKey(host string) ssh.PublicKey {
if len(fields) != 3 { if len(fields) != 3 {
continue continue
} }
for _, field := range fields { log.Printf("Field[3]: %s ", fields[3])
log.Println(field) log.Printf("Base-64 of %s: %s", host, base64.StdEncoding.EncodeToString([]byte(host)))
} if strings.Contains(fields[3], base64.StdEncoding.EncodeToString([]byte(host))) {
if strings.Contains(fields[0], base64.StdEncoding.EncodeToString([]byte(host))) {
var err error var err error
hostKey, _, _, _, err = ssh.ParseAuthorizedKey(scanner.Bytes()) hostKey, _, _, _, err = ssh.ParseAuthorizedKey(scanner.Bytes())
if err != nil { if err != nil {