Skip to content

Instantly share code, notes, and snippets.

@victor-torres
Created April 24, 2018 19:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victor-torres/175058f07628182ff9031b91c7995fdc to your computer and use it in GitHub Desktop.
Save victor-torres/175058f07628182ff9031b91c7995fdc to your computer and use it in GitHub Desktop.
Remote pbcopy and pbpaste
Host <your host ip>
User <your host user>
Port <your host port>
#!/bin/bash
xargs -I {} ssh $(echo $SSH_CONNECTION | cut -d ' ' -f 1) 'echo "{}" | pbcopy'
#!/bin/bash
ssh $(echo $SSH_CONNECTION | cut -d ' ' -f 1) 'pbpaste'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment