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:
RequiredAuthentications{1,2}
It is listed here: linux.die.net
So I added this line to the /etc/sshd_config
RequiredAuthentications2 publickey,password
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): bugzilla.mindrot.org
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 these tutorials
www.howtogeek.com -1
www.howtogeek.com -2
The result is the same on the Linux 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.