How do I send files from one Mac to another via Terminal?
Enable "Remote Login" in the preferences of the target/remote mac. Then use

scp file user@remotehost:

with user being the short name of the remote user. You will be asked for the password of the user on remotehost.

If you want to avoid using passwords, you can set up ssh key pairs. See here for details.