I read this article about authentication methods for SSH

This is what is written there?

During keyboard authentication zero or more prompts (questions) is presented to the user. The user should give the answer to each prompt (question). The number and contents of the questions are virtually not limited, so certain types of automated logins are also possible.

I run SSH server on Ubuntu. My question is how can I add more prompts(questions)? Now it prompts just for the password.

Thank you

  • What kind of prompts do you want? Are you after a more secure authentication? or like a capcha? – wlraider70 Mar 27 '13 at 18:34
  • I am just trying to make some experiments, just trying to figure out how this stuff works. So what if I want another prompt like password2. How to do it? – Milan Novotný Mar 27 '13 at 18:42

When using ssh security is a big concern

You can use a password, a pubkey, and/or PAM authentication.

I used public / private keys for a while (pubkey). They are cool because it actually require no password, but its very secure. The downside if you are new to the whole thing is that they are a bit unwieldy.

PAM is a module that lets you use a second factor auth. Like a usb token. Or a google authticattor app on your phone. This is my favorite. http://www.howtogeek.com/121650/how-to-secure-ssh-with-google-authenticators-two-factor-authentication/ for a guide

It lets you enter your password which you know, then open the app to enter the 2nd factor which changes regularly.

  • This google authenticator is very cool but its not exactly what Im looking for. As I wrote above, Im not looking for some real use but more for testing. Lets say I want another prompt like: Colour of Sun: and the user has to type yellow. Dont think like its useless or it doesnt make any sense. I just want to know how to do it. I expected that its enough to configure it in ssh config file but i think it will be more complicated – Milan Novotný Mar 27 '13 at 20:21

Your Answer

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

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