Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to add a preliminary authentication stage to an openssh server running on linux. Ideally authentication would happen before even getting to the openssh application itself, or at least before handshakes etc. I will use one-time passwords, so it can even be done over plain text connection.

Is there some standard way I could do this? Thanks.

share|improve this question
up vote 2 down vote accepted

What's wrong with the standard S/KEY implementation in OpenSSH? Gentoo Wiki makes it very clear how to use it. Basically you just use skeyinit and skey commands for creating your one-time passwords.

share|improve this answer
Thanks it might be helpful to see how I can implement something similar. I would really prefer to have a preliminary step though, as I want to have somewhat better control over it, not like in the S/Key case when simply forgetting to set "UsePAM no" screws everything up... – Roman L Mar 26 '12 at 15:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.