SSH to the remote computer. Run:

while sleep 2
do
    nc -l 9999 |
    dd of=/dev/null 2>&1 |
    awk '/MB\/s/ {print $10 * 8 "Mbps"}'
done

Send data to the remote computer using this script:

while sleep 2
do
    dd if=/dev/urandom bs=1000000 count=100 | nc 10.0.0.108 9999
done

The the remote script will print the number of Mbps. It is common for a 1Gbps network to report ~300Mbps due to the overhead of sending data through the operating system and over TCP.

For instance, using a hardwired 1Gbps connection between two computers, I get an average of 275Mbps. Using a hardwired source computer to a computer on 2.4GHz Wi-Fi, I get 20Mbps.

Note: it's possible the remote Linux computer has a firewall, to open UDP and TCP ports 9999 for this example, use:

sudo ufw allow 9999

If ufw is not installed, install it :) - or you'll need to figure out how to use iptables... Chances are if ufw is not installed, iptables isn't configured to close ports anyway.