base64 encoding for host
This commit is contained in:
parent
abec574b76
commit
3863f34fc0
@ -2,6 +2,7 @@ package backy
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"encoding/base64"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
@ -140,7 +141,7 @@ func getHostKey(host string) ssh.PublicKey {
|
|||||||
if len(fields) != 3 {
|
if len(fields) != 3 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if strings.Contains(fields[0], 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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user