The docker image is bare-bones and doesn’t include the ssh client. I did a basic test where I installed the ssh client inside the docker container and it seemed to work, but you should probably do more testing.
Get to a shell inside the docker container and run:
Ignore the message about conflicting distribution, then run:
# apt install openssh-client
Pess Enter at the Y/n prompt. Once complete you can run the ssh command, including from within a script that Duplicati executes before/after your backup job.
You’ll need to redo this installation when you download new docker images for Duplicati, of course.