Permission denied (publickey) when running ssh console

I’m trying to copy files from the server to localhost and I’m following steps mentioned here Connect To fly.io Sqlite Production Database | CodeGregg: Minneapolis Web Developer.

I have successfully been able to connect to wireguard and also been able to connect to my server using fly ssh console but when I run
scp root@app-name.internal:/app/db/production.sqlite3 fly_backup.sqlite3
I get the following error:

Warning: Permanently added 'app-name.internal,fdaa:0:773d:a7b:14bf:d6e7:b5b1:2' (ED25519) to the list of known hosts.

root@app-name.internal: Permission denied (publickey).```

Something like this should help: SCP a file into a persistent volume - #2 by jerome