Skip to content

Instantly share code, notes, and snippets.

@victor-torres
Created April 24, 2018 19:23
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