My favorite way is ssh [remote-machine] "cat log.txt" | xclip -selection c. This is most useful when you don’t want to (or can’t) ssh from remote to local.
Edit: on Cygwin ssh [remote-machine] "cat log.txt" > /dev/clipboard.
Edit: A helpful comment from nbren12:
It is almost always possible to setup a reverse ssh connection using SSH port forwarding. Just add
RemoteForward 127.0.0.1:2222 127.0.0.1:22to the server’s entry in your local.ssh/config, and then executessh -p 2222 127.0.0.1on the remote machine, which will then redirect the connection to the local machine. – nbren12