开发者

How to prompt for some information from PAM module

开发者 https://www.devze.com 2023-02-02 08:11 出处:网络
I\'m writing a Plug-gable authentication module for ssh. I am looking for prompting for some extra information after user name and password verification but before giving access to user. Can anyone su

I'm writing a Plug-gable authentication module for ssh. I am looking for prompting for some extra information after user name and password verification but before giving access to user. Can anyone suggest how should I do this.

Actually after SSH I want to ex开发者_Go百科tend the same for some other services. So I am looking at some PAM module level suggestion.

[EDIT] Solution : I have used conversation function provided by PAM. It is used to communicate between PAM aware application and module.

Thanks, GG


Have a look at keyboard-interactive ssh authentication method it is designed for such cases.

For OpenSSh you should enable PAMAuthenticationViaKbdInt, ChallengeResponseAuthentication and UsePAM in sshd_config.

Didn't tried it though, hope it will help.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号