I'm using Ubuntu Server 13.04 and want to use OpenSSH for sftp. I have everything set up and the only thing not working is the Two Factor Authentication. Currently it asks for a password or the public key but I need it to ask for a password AND a public key.
It seams that there is a parameter in the sshd_config for that:
It is listed here: http://linux.die.net/man/5/sshd_config
So I added this line to the /etc/sshd_config
But sshd -t would always give this error /etc/ssh/sshd_config: line 26: Bad configuration option: RequiredAuthentications2
My version of OpenSSH is 6.1.p1-4. From this post I figured that it is only available in openssh-6.2: (The last post): https://bugzilla.mindrot.org/show_bug.cgi?id=983
To test this on another computer with Linux Mint i tried to compile this version from source as it is not available for ubuntu stable.
I did this using auto-apt as suggested in this tutorials http://www.howtogeek.com/105413/how-to-compile-and-install-from-source-on-ubuntu/ http://www.howtogeek.com/106526/how-to-resolve-dependencies-while-compiling-software-on-ubuntu/
The result is the same on the Mint Computer.
So I'm stuck for the moment.
P.S.: Somewhere else I found you could use a second authentication script but I'm not sure if this is a good and secure solution. I want to use the server with normal ftp programs like WinSCP or Filezilla from Windows. I don't know if they would understand that way of authentication.