Skip to content

Instantly share code, notes, and snippets.

@samesense
Last active May 15, 2019 11:32
Show Gist options
  • Save samesense/9f29278fd9fc7da1a78ca2260e438bd3 to your computer and use it in GitHub Desktop.
Save samesense/9f29278fd9fc7da1a78ca2260e438bd3 to your computer and use it in GitHub Desktop.
Copy to local machiine clipboard from iteractive remote session

Copy to local machine clipboard from iteractive remote session

  • Works with macOS and remote linux machine
  • On local machine, make this plist file to use with launchclt
  • On local machine launchctl load local.pbcopy.9999.plist. This must remain running for remote copy to work.
  • On remote machine cat "message or file" | nc localhost 9997 -w1
  • nc is at /mnt/isilon/cbmi/variome/perry/bin/nc
  • On local machine, use paste or pbpaste as usual

Extra

  • On my locate machine, p is aliased to the launchctl command
  • On the remote machine, cr is aliased to the nc command

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment