Normally if you want to quickly send a file to a remote directory on an ssh server as a one liner or within a script, the following would suffice:
scp file server:path
Occasionally, you may come across a server that only has sftp enabled and not scp. For example if the OpenSSH server you were connecting to was configured as follows:
Subsystem sftp internal-sftp