Hacker News new | ask | show | jobs
by nikvdp 1273 days ago
I keep a cobbled together version of something like this in my rc files. The ui mimics macOS’s pbcopy/pbpaste commands (it degrades gracefully on linux boxes too by falling back to xsel if available, and then to a tmp file for use on headless servers).

The special sauce is that you can put a server name from your ssh config on the end of a pbcopy or pbpaste command so you can do stuff like run `echo hello | pbcopy server2` on server1, after which doing `pbpaste` from server2 would print 'hello'. You can also do this in the other direction with pbpaste, eg from server2 you can run `pbpaste server1` and it'll print out the contents of server1's clipboard.

The current setup is a bit coupled to my rc files, but if there's interest would be glad to refactor a bit and toss it on github

4 comments

> if there's interest would be glad to refactor a bit and toss it on github

Even just upload it in its current state would be nice :)

yep, I want this and you're half way there!
what's the missing half? file transfer?
YOU put this together! I've just realised. What a dude! Great rally.
I'd like to do this with a client/server routine where the server will spit out to any client connected with a tunnel
Very interested