Ftp – ProFTPd with sftp first login fails, seconds succeeds

ftpproftpdsftp

We are working with ProFTPd and SFTP module enabled. We have a problem with using the sftp module.

When we try to connect to server in FileZilla we need to enter the password to the server twice, upon connection and upon each file upload, which is very undesired. How can we help this? any idea's? suggestions?

when we use the interactive login type in FileZilla, it works when we enter the username and password twice.

Best Answer

If you're experiencing the same issue as I am you will find in your server's auth log that proftpd first tries pam_unix before falling back to the configured authentication method. For me I am using authuserfile and not Unix authentication. As with you my first attempts always fail and the second attempts always succeed.

The proftpd documentation would have you believe that AuthPAM off disables pam authentication entirely. I find this to be inaccurate as proftpd continues to try pam even with AuthPAM off and PersistendPassed off.

I recompiled proftpd without pam and now I can login the first time. The problem is that most distributions ship binary packages and may not even give you this ability. If that is the case then you could always modify pam to use the authentication method you require.