scp from user A in machine 1 to user B in machine 2

Hi all, would like to find out how can i scp a file from user A in one host to user B in another host?

i know how to get it done if its from user A in machine 1 to user A in machine 2.
1)on machine 1, generate a key pair. put the private key in the .ssh directory.
2)put the public key in /home/A/.ssh/authorized_keys in machine 2.

now i have a situation of scp_ing a file from user A to B. user B does not exist in machine 1 and user A does not exist in machine 2.

what i think will work:
1) in A's home dir in machine 1, generate the key pair. place the private key in /home/A/.ssh
2) put the public key in /home/B/.ssh/authorized_keys. because the command i am using is

scp/home/A/file1 B@machine2:/home/B/

it should search in B's .ssh dir for the matching public key right?

I've not had much success with scp unless either the source or target are local.

You are right. The users on the source and destination systems do not have to be the same. What you are trying to do will work.