Closed tanzhenchao closed 7 months ago
Hi, what is the outcome you expected?
Hi, what is the outcome you expected?
We want to achieve that after the sftp user enters the username and password, the user receives a one-time token by email, and then the user can upload and download files normally after entering the received email one-time token and passing the authentication. Our current configuration allows users to log in normally, but if they upload or download files, they will be prompted to authenticate again.
I noticed that the following URL requirements are very similar to ours: https://github.com/privacyidea/privacyidea-pam/blob/main/samples/privacyidea-2nd-auth But there are some differences from our requirements. What we need to achieve is to trigger the sending of a one-time email token after entering the password. I think I need to modify the configuration and test it after referring to the above link again.
You have sendEmptyPass
set, so the mail should be triggered, provided you configured the PIN of the email token to be empty.
Then your problem is that you do not want to re-authenticate?
You have
sendEmptyPass
set, so the mail should be triggered, provided you configured the PIN of the email token to be empty. Then your problem is that you do not want to re-authenticate?
Yes, this problem has been bothering me a lot, and I don't know how to solve it.
Hello! We'd like to know whether this issue is a software bug or can be fixed by tuning PAM modules or parameters like in the example below? https://github.com/privacyidea/privacyidea-pam/blob/main/samples/privacyidea-2nd-auth
Hi nilsbehlen I think we misunderstood before. We tested file upload using the sftp command line today and the authentication will not be triggered again, so the problem lies in the FileZilla client. The following is the process of our command line test:
# sftp -P 115 'will@cmdschool.org'@sftp.cmdschool.org
(will@cmdschool.org'@sftp.cmdschool.org) Password:
(will@cmdschool.org'@sftp.cmdschool.org) Enter the OTP from the Email:
Connected to sftp.cmdschool.org.
sftp> ls
myhome
sftp> cd myhome/
sftp> ls
dbeaver-ce_22.1.2_amd64.deb
sftp> lcd /home/will/Downloads/
sftp> put www.cmdschool.org_nginx.zip
Uploading www.cmdschool.org_nginx.zip to /myhome/www.cmdschool.org_nginx.zip
www.cmdschool.org_nginx.zip 100% 8628 571.8KB/s 00:00
sftp> exit
This issue has been reported to the FileZilla client: https://forum.filezilla-project.org/viewtopic.php?f=2&t=58476&p=189154#p189154
We found that the new versions of WinSCP and Bitvise SSH Client can perfectly solve this problem.
Hi, that is good to hear. I will close this issue then, if there is no concrete problem with this software.
We implemented a 2FA authentication for sftp, but we encountered some problems. Here are the detailed configuration steps: https://www.cmdschool.org/archives/23755
The pam configuration of the sftp client is as follows:
We found that after the sftp user successfully logs in and browses to the user directory, when the user downloads or uploads a file, the login is triggered again.
The detailed client logs of the two are as follows, obtained using the "systemctl status sftpd.service" command:
We don't know what's going on? Can you help?