1

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

GG.
  • 2,835
  • 5
  • 27
  • 34

1 Answers1

0

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.

kriss
  • 23,497
  • 17
  • 97
  • 116
  • Actually after SSH I want to extend the same for some other services. So I am looking at some PAM level suggestion. Sorry for incomplete question. – GG. Jan 05 '11 at 14:45
  • OK, I clearly am on the wrong side of the answer. Thanks for clarifying. – kriss Jan 05 '11 at 14:50