Bypass getting prompted for private ssh key

I successfully created a remote sftp storage.

I use an ssh key without a passphrase to connect with no issue.

However when running the backup command I get prompted for the following:

Enter the path of the private key file:

I do NOT have to enter the path. I simply just have to hit enter and the backup works fine.

How can I stop getting prompted for this since it doesn’t use it and I can simply hit enter to bypass it.

I need to use a bash script so I don’t want to have to hit enter to bypass this.

So you’re using an ssh agent instead of specifying the private key file explicitly…

In that case, you can set the environment variable DUPLICACY_SSH_KEY_FILE to an arbitrary non-empty value. Duplicacy will always try connecting via the agent first even if a private key file is specified.

If this doesn’t work, add the -d option (duplicacy -d backup) to enable more log messages.

My apologies for asking a dumb question, but can you give me an example of how/where to configure/set this?

Thanks!

For example, enter this in the terminal (assuming this is macOS/linux) before running the backup command:

export DUPLICACY_SSH_KEY_FILE=none