Borderline ServerFault question, but I\'m programming some shell scripts, so I\'m trying here first :)
Most *nixes have a command that will let you pipe/red
All the existing solutions either need:
xclip on the server works great) or Here's another way to do it, though you'll need to modify how you ssh into your computer.
I've started using this and it's nowhere near as intimidating as it looks so give it a try.
ssh username@server.com -R 2000:localhost:2000
(hint: make this a keybinding so you don't have to type it)
nc -l 2000 | pbcopy
Note: if you don't have pbcopy then just tee it to a file.
cat some_useful_content.txt | nc localhost 2000
Actually even if you're in the middle of an ssh session there's a way to start a tunnel but i don’t want to scare people away from what really isn’t as bad as it looks. But I'll add the details later if I see any interest