1

Is possible to integrate two-factor authentication for transferring files or uploading the codes to a web-server?

If yes, will it work for any client or it will work for a specific SFTP client?

2

1 Answer 1

2

Is possible to integrate two-factor authentication for transferring files or uploading the codes to a web-server?

yes, sure. The authenticating layer in SFTP is done through SSH means, so any method that applies to SSH, for example https://developer.ibm.com/blogs/two-factor-authentication-for-ssh/ (and many other; in essence, sshd can be told to require a full set of authenticators).

If yes, will it work for any client or it will work for a specific SFTP client?

Your client needs to be able to let you fill in / connect whatever factor you have. But as said, this just happens through the underlying SSH facilities.

By the way, it's very usual to have one's SSH keys safely on a smartcard, which only allows for usage after unlocking. That's two factors (hardware token "smartcard", unlocking through PIN) in itself, and pretty well-supported.

4
  • 2FA we have implemented for SSH, but my requirement is for SFTP 2FA. We need to implement that for also that should work for FileZilla or any other client.
    – AReddy
    Jun 27, 2022 at 14:56
  • 4
    Again, SFTP is SSH. SFTP in itself does not specify any authentication — it relies on SSH to do that. So whatever works for SSH works for SFTP. Jun 27, 2022 at 14:57
  • If I do it from CLI it will work, but the SFTP tool should prompt for 2FA. If you have any link which can help please share.
    – AReddy
    Jun 27, 2022 at 15:00
  • 2
    there's nothing to link. Set up your SSH auth to do 2FA, and your SFTP client to use the same SSH agent (i.e., don't set up anything but the same host name you set up in your ~/.ssh/config) Jun 27, 2022 at 15:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .