View Full Version : Python authentication to OpenSSH
Tortanick
June 5th, 2006, 03:09 PM
I was wandering if/how you could some how have OpenSSH make users imput a password to a Python script, if the password is correct the python script will pass the user to the normal username/password you get when logging into OpenSSH.
LordHunter317
June 5th, 2006, 09:14 PM
Why would you ever want to do this? I'm not aware of any easy way to do this, and it's a terribly bad and likely dangerous idea anyway.
Tortanick
June 6th, 2006, 04:40 PM
I created my own password system designed to give me a hint that I could use to deduce a new password every time I log in.
I can't see whats so bad or dangerous about it though?
LordHunter317
June 7th, 2006, 01:07 PM
Because if you're not careful, you'll compromise your system.
You probably want to look at S/KEY, which already does what oyu likely want.
Tortanick
June 7th, 2006, 01:32 PM
S/Key creates a list of one use passwords, my system creates a new password for every attempt and I figure out the new password when I want to log on and type that. Quite a big diffrence.
As for being carefull:
The python script's only user imput is a string. (raw_input)
I plan to keep the traditional user/password as a failsafe
The only risk is I make a mistake while implementing the python authentication, and thats what I asked for help with,
LordHunter317
June 7th, 2006, 02:22 PM
Yes, but what's to stop me from making the guess and getting in instead?
Anyway, the only way to inject it into the OpenSSH auth stack is to recompile OpenSSH.
If you really want to do this, create a PAM module. But I'm positive you really don't want to do this.
vBulletin® v3.8.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.