-
-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support requiring both key and password #104
Comments
Hi, we need multi-step authentication support in crypto/ssh to be able to add this feature, there is already an open ticket there and a pending pull request golang/go#17889 Currently we can support multi step authentication via keyboard interactive authentication but this method is not suitable to ask for public keys |
Hi, I'm working on this, I wrote a first patch to add Multi-Step Auth to crypto/ssh. Existing patches don't allow per-user Multi-Step Authentication. I'll add I tested using Thanks! |
That sounds great! We will probably just use password, publickey and publickey+password, so yes. :-) I'm not really sure what clients are used today, but we will at least need to support Apache Camel and FileZilla. I can help test with those. |
Hi, partial authentication is now supported, you should see logs such as these ones: {"level":"debug","time":"2020-04-09T23:52:14.289","sender":"sftpd","connection_id":"6721c5f0aca840bfb50190340b6a938c6cffeb9a045456045cc831a2a944c6e7","message":"user \"a\" authenticated with partial success"}
{"level":"info","time":"2020-04-09T23:52:16.770","sender":"sftpd","connection_id":"6721c5f0aca840bfb50190340b6a938c6cffeb9a045456045cc831a2a944c6e7","message":"User id: 5031, logged in with: \"publickey+password\", username: \"a\", home_dir: \"/tmp/test\" remote addr: \"127.0.0.1:53532\""} I was unable to find a way to activate partial authentication in filezilla (keyboard-interactive works fine), while jsch should support it, but I didn't test it myself. Please let me know if it works for you and if you have a client that works against OpenSSH and doesn't work against SFTPGo, thanks! |
This work for me now, please reopen or fill separate issues if you have any problems or suggestions |
I have tested publickey+password with the sftp client from the openssh-client package, with FileZilla and with Apache Camel. I configured all other auth methods as denied.
So this seems to work as intended from my perspective. Thanks! When can a new release be expected? :-) |
Great thank you for your feedback!
Honestly I don't know. I would like to receive at least a first review for my patch before the next release, let's see. |
Is Filezilla working the same way with OpenSSH too? It could be a bug, thanks
|
I have tested this now and I saw the same behavior with OpenSSH. |
Thank you for the feedback, very appreciated |
Hi again, please update to the latest version, my patch for crypto/ssh contains a security bug that should be fixed now 760cc9b sorry for the annoyance |
Would it be possible to add support for requiring both public key and password in a simple way?
Configuration wise, perhaps the denied_login_methods can be used for this by adding a new alternative, e.g. "publickey-and-password". Then you can deny all other methods. This shouldn't be any problem with backward compatibility.
The text was updated successfully, but these errors were encountered: