The issue might be that you are using a third machine — your local machine — to copy files from 11.11.11.22 to server.com. I am sure if you login directly to 11.11.11.22 you can then run this command fine:
scp -r /home/filename.php user@server.com:/home/scripts
But if you are actually logged directly into 11.11.11.22 then your command doesn’t need the [user]@[hostname] stuff. It can just be:
scp -r /home/filename.php user@server.com:/home/scripts
In fact, drop the -r — since you are just copying one file — and run it like this:
scp /home/filename.php user@server.com:/home/scripts
Just be sure you use the -A option when SSHing into 11.11.11.22. As the SSH man page states:
“Enables forwarding of the authentication agent connection. This can also be specified on a per-host basis in a configuration file.”
Meaning your key from your local machine is passed along during the SSH session. So you initially login to 11.11.11.22 like this:
ssh -A user@11.11.11.22
You can then cleanly login to server.com like this:
ssh user@server.com
Which then means this SCP command should work without prompting for a password:
scp -r /home/filename.php user@server.com:/home/scripts