Well, at the end I was able to make it work!
))))
Once I could get the errors (access denied!) I realised that it was actually a problem with the environmental variables so after trying again with the older posts, I had to go through the export and printenv issues.
In my environment I found two variables related to the ssh agent (SSH_AUTH_SOCK and SSH_AGENT_PID) so I added them to the script:
#!/usr/bin/ksh
export SSH_AUTH_SOCK=... (copied after the command printenv)
export SSH_AGENT_PID=... (idem)
/sftppath/scp root@remoteserver:/remotepath/remotefile /localpath/localfile
exit 0
And it worked!!!
Not easy for me as a newbie, however... I post the solution here in case it could serve for anyone.
bye!!
PD: I guess I'll have problems with the agent id again, when I login next time, anyway...