Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature/Enhancement] 使用 pamtester 进行密码验证替代ssh连接 #1424

Open
link89 opened this issue Sep 10, 2024 · 0 comments
Open

Comments

@link89
Copy link
Contributor

link89 commented Sep 10, 2024

为何需要此功能 | Why is this needed

不少集群使用 NIS 而非 LDAP 进行账号管理,包括一个我正在维护的集群。在这种集群里我们不得不使用 ssh 做为认证方式。但目前ssh 认证存在一个问题,即它是通过 ssh 的密码连接方式进行认证,而大部分集群出于安全性考虑是禁用 ssh 密码登录的,于是导致这个方法并不实用。

希望增加什么 | What would you like to be added

在ssh模式下,scow 应该通过 root 连接到登录节点,然后使用 echo <password> | pamtester login <username> authenicate 进行密码验证。
这种做法不仅不存在ssh无法通过密码连接的问题,使用 pam 也是更通行的做法。

为了实现上述功能,可以在 auth_type 为 ssh 时支持一个新选项:authCommand, 其默认值为 echo {passowod} | pamtester login {username} authenticate。 该选项允许用户自定义使用ssh的认证方式,可以以最灵活的方式满足不同要求。但这里需要注意,password 和 username 都需要进行 shell string escape, 以避免远程命令注入的危险。

此功能为谁设计? | Who is this feature for?

scow 运维人员。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant