`OWNER RIGHTS` not allowed on identity file ACL, even if owner is in `Administrators`
@tgauth 已经在做这个了。
开始于 2025年1月6日。
评估
这个 Issue 还没有评估数据。
描述
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
When a private key identity file has the OWNER RIGHTS group permission attached and the file is owned by an administrator, the OpenSSH client fails with a warning that the file's permissions are too open:
> ssh -p port -i C:\Path\To\TempDir\Keyfile destination
Bad permissions. Try removing permissions for user: \\OWNER RIGHTS (S-1-3-4) on file C:\Path\To\TempDir\Keyfile.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for 'C:\Path\To\TempDir\Keyfile' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "C:\Path\To\TempDir\Keyfile": bad permissions
destination: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
My understanding is that only administrators and System can have access to the key file. It looks like the client explicitly checks for the admin and system SIDs, but does not follow an owner rights SID and checks that the file is owned by an admin. I was curious if maintainers would be open to allowing OWNER RIGHTS provided that the owner is an admin.
Related:
Expected behavior
# Identity file with `OWNER RIGHTS` permissions attached
> ssh -p port -i C:\Path\To\TempDir\Keyfile destination
# SSH succeeds
Last login: Tue Dec 17 20:44:37 2024 from foo
Actual behavior
# Identity file with `OWNER RIGHTS` permissions attached
> ssh -p port -i C:\Path\To\TempDir\Keyfile destination
# SSH fails
Bad permissions. Try removing permissions for user: \\OWNER RIGHTS (S-1-3-4) on file C:\Path\To\TempDir\Keyfile.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for 'C:\Path\To\TempDir\Keyfile' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "C:\Path\To\TempDir\Keyfile": bad permissions
destination: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Error details
No response
Environment data
Name Value
---- -----
PSVersion 5.1.20348.2760
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.2760
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version
9.5
Visuals
- 主要语言
- 没有语言数据
- 星标
- 8.4k
- 派生
- 824
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PowerShell/Win32-OpenSSH 的其他 Issue
-
0 - Backlog Issue-Enhancement
难度 2/5 1-3 小时 新手友好度 76/100
PowerShell/Win32-OpenSSH#2482 · 1 个 reaction ·
-
Area-ssh-agent Issue-Upstream Parity
难度 2/5 1-3 小时 新手友好度 74/100
PowerShell/Win32-OpenSSH#2458 · 1 条评论 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 20/100
PowerShell/Win32-OpenSSH#2490 ·
-
ssh -t exec path concatenates the command unquoted — GNU-style -c shells lose all but the first word可能已有人在做 @caomengxuan666 于 24 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 62/100
PowerShell/Win32-OpenSSH#2478 · 2 个 reaction ·
-
Investigate
难度 4/5 3-5 天 新手友好度 42/100
PowerShell/Win32-OpenSSH#2476 · 1 条评论 · 1 个 reaction ·