C pam module
From John Freier
PAM - Pluggable Authentication Module
PAM Modules are modules that can hook up to different applications that implement PAM patterns, such as SSH.
Setup
To begin development, some configuration may need to be done to some of the PAM configuration files. For this example I will use SSH.
These files are located
/etc/pam.d/sshd
Tip* For SSH, if you need to conversate, turn on Challenge Response in the SSHD config file.
/etc/ssh/sshd_config Line: ChallengeResponseAuthentication yes