My question regards
rsync, etc. commands where you connect to another machine which can be in your Local Area Network (LAN) or at some remote location you would typically connect via the Wide Area Network (WAN) or greater internet.
For instance, if you were to use these each of these two commands,
ssh user@publicIP.com ssh firstname.lastname@example.org
whereby you connect namely to a remote machine or a LAN machine respectively, does the actual connection path change if you are in the same LAN? Note publicIP.com represents the IP address or domain name that applies to both the host and the machine executing this command.
As an example, consider the case you are at home and have two machines connected to the internet through the same router. I would expect the second command to send data from
machine1-->router-->machine2. Does the first command do the same or does it do
machine1-->router-->some remote path-->router-->machine2? And in the second case, will this contribute to the bandwidth your ISP monitors and caps?