diff --git a/ssh/tailssh/user.go b/ssh/tailssh/user.go index 0f2709e62..6acc66c07 100644 --- a/ssh/tailssh/user.go +++ b/ssh/tailssh/user.go @@ -81,7 +81,11 @@ func userLookup(username string) (*userMeta, error) { } func validUsername(uid string) bool { - if len(uid) > 32 || len(uid) == 0 { + maxUid := 32 + if runtime.GOOS == "linux" { + maxUid = 256 + } + if len(uid) > maxUid || len(uid) == 0 { return false } for _, r := range uid {