There’s never a situation where I want to copy/paste to any clipboard other than my local clipboard, so I solved this by simply aliasing pbcopy/papaste to always SSH back to my mac and run pbcopy/pbpaste there.
But "where" is your mac? I.e., `cat clipboard | ssh ??? pbcopy`. I travel, so I don't always have the same IP address, and it's still too common to end up in a NAT'd hellscape with no usable IP. (Every office I've ever worked in, with one exception, has have v4-only NAT'd networks. Usually on a -PSK Wifi. Corp network infra is typically a joke.)
One could perhaps set something up to forward a connection to a local daemon and then use that forwarded connection to push data backwards, but the complexity is going up, and fast.
Wireguard is the same problem, just with a layer of indirection. (I've tried WG exactly to try to simplify the networking!) Now instead of SSH connecting, it's Wireguard.
You can make some headway with this, but it's a bit painful. You need some fixed presence on the Internet, somewhere, like a server. That can be done, but now you're setting up routing, etc. Or paying Tailscale. It rubs me a bit of the wrong way, since the ISPs job was to provide end-to-end connectivity, and ISPs as a whole are falling down on that … I shouldn't need to build a shadow network in the IPv6 private space …
(And again, we breach the "it isn't worth it" complexity barrier for a cross machine clipboard transfer…)
That only adds a layer of indirection to the same problem. You can refer to your laptop by hostname, but something have to update the hostname's record when the laptop moves about. That could be a daemon on the laptop [yada yada] but now you've added a ton of complexity. (And there's still the problem of NAT: your laptop might not be on the Internet.)