Created
April 24, 2018 19:23
-
-
Save victor-torres/175058f07628182ff9031b91c7995fdc to your computer and use it in GitHub Desktop.
Remote pbcopy and pbpaste
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host <your host ip> | |
User <your host user> | |
Port <your host port> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
xargs -I {} ssh $(echo $SSH_CONNECTION | cut -d ' ' -f 1) 'echo "{}" | pbcopy' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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