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 {
hostKeyRawString := strings.TrimSpace(string(*hostKeyRaw))
parts := strings.SplitN(hostKeyRawString, " ", 1)
parts := strings.SplitN(hostKeyRawString, " ", 2)
if len(parts) > 1 {
return parts[1], nil
}