Copying Remote Command Output to Your macOS Clipboard
The article explains how to copy remote SSH command output to the macOS clipboard using a small script that sends an OSC 52 escape sequence. With iTerm2's clipboard access setting enabled, a `pbcopy` script on the remote server pipes base64-encoded data to the local Mac clipboard. This works with iTerm2 and other OSC 52-compatible terminals, but not Apple's Terminal.app.