Fix host keys split
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adam Štrauch 2023-04-14 19:12:21 +02:00
parent 3ae383d1cd
commit 45996c4d1b
Signed by: cx
GPG Key ID: 018304FFA8988F8D

View File

@ -293,7 +293,7 @@ func (c *Container) GetHostKey() (string, error) {
if hostKeyRaw != nil { if hostKeyRaw != nil {
hostKeyRawString := strings.TrimSpace(string(*hostKeyRaw)) hostKeyRawString := strings.TrimSpace(string(*hostKeyRaw))
parts := strings.SplitN(hostKeyRawString, " ", 1) parts := strings.SplitN(hostKeyRawString, " ", 2)
if len(parts) > 1 { if len(parts) > 1 {
return parts[1], nil return parts[1], nil
} }