Transfer files over SSH in FreeBSD / Linux

How to copy a file from one remote host to another via SSH?
# Scp -P 22 /etc/rc.conf user@192.168.3.1: /var/db/rc.conf

This command copies the rc.conf on the machine with the address 192.168.3.1 via ssh on port 22.

How to copy a folder with one remote machine to another via SSH?
# Scp -r -P 22 user@192.168.3.1: / etc / mail / var / log