Here is what I try to accomplish:
I have a server with a git repository.
I use ISPConfig as control panel for our websites and I want to integrate the ISPConfig API for email authentication as second authentication.

Here is the authentication flow:

  1. The user connects with ssh-rsa key (without password)
  2. The ssh has to run a script which prompts the user for second authentication with email and password. These credentials are verified with the API and if correct the user is logged in through SSH, otherwise the user is disconnected.

I've installed the libpam_script (apt-get install libpam_script) and tried to configure it, but with no luck.
I've tried several things by adding this line auth required pam_script.so to:

None of them executed the script /etc/security/onauth nor /usr/share/libpam-script/pam_script_auth
In both scripts I have this code:

echo "Logging" > /home/server/pam.log

The code is just for testing to see if it's even executed.

  • The SSH login will be with ssh-rsa key and I'm trying to integrate a second authentication through a script which is ran after the user logs with SSH. – Ivan Dokov Jan 14 '14 at 9:41
  • You might want to put that into the question - as it is now I would really rend to suggest closing as "unclear what you're asking". – peterph Jan 14 '14 at 10:18
  • I've edited my question – Ivan Dokov Jan 14 '14 at 11:00
  • I've tried so many things with pam_script. Nothing really worked. – Ivan Dokov Jan 14 '14 at 13:41
  • So pam_script doesn't work even when logging in on console (through login)? – peterph Jan 14 '14 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.