GG.
GG.

Reputation: 2951

How to prompt for some information from PAM module

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 extend 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

Upvotes: 1

Views: 917

Answers (1)

kriss
kriss

Reputation: 24177

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.

Upvotes: 0

Related Questions