diff --git a/containers/types.go b/containers/types.go index 8aec98c..1feabc6 100644 --- a/containers/types.go +++ b/containers/types.go @@ -291,7 +291,8 @@ func (c *Container) GetHostKey() (string, error) { } if hostKeyRaw != nil { - parts := strings.SplitN(string(*hostKeyRaw), " ", 1) + hostKeyRawString := strings.TrimSpace(string(*hostKeyRaw)) + parts := strings.SplitN(hostKeyRawString, " ", 1) if len(parts) > 1 { return parts[1], nil }