Nextcloudcmd: two-factor authentication from command line with google authenticator (feature request)

Version Info

Nextcloud version 3.4.3-20220228.181513.99ab28eeb-1.0~focal1
Using Qt 5.12.8, built against Qt 5.12.8
Using ‘OpenSSL 1.1.1f 31 Mar 2020’
Running on Ubuntu 20.04.4 LTS, x86_64

Running nextcloudcmd via SSH with TOTP authentication activated


  • Nextcloud via SSH command line works nicely with nextcloudcmd (without TOTP active)
  • when TOTP authentication in Nextcloud is activated, it works nicely via web
  • Google-Authenticator is installed and works on VM with Ubuntu via SSH (see Version Info above)

There appears to be no way to enter a TOTP authentication code when using nextcloudcmd via SSH.

Hence, when running nextcloudcmd, it cannot synchronize without credentials and shows:

[ warning nextcloud.sync.networkjob ]: QNetworkReply::AuthenticationRequiredError "Host requires authentication" QVariant(int, 401)

This is posted in Nextcloud Support (and not in Features & Apps) as it concerns the functionality of nextcloudcmd.

Would you be able to implement this feature soon?

I was under impression one would use application password in such situation. Does it work for you?

1 Like

Sure, without TOTP auth active the application password is being requested and it works.
However, I would like to secure my Nextcloud files with more than just a single password.

I think this is what @wwe means with application password.


Ah, ok…
Thank you @wwe for your suggestion and @bb77 for your clarification.

And yes, a device-specific password works for this scenario and it should cover what I was looking for.

Thank you.

1 Like