Re: Copy remote command server to clipboard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Am 26.08.19 um 13:47 schrieb Maykel Franco via arch-general:
...
> Many thanks Ralph, it works, but... Is possible launch the command in my server?
> 
...

Hello Maykel,

You can run a local server that copies everything it receives to the
clipboard. Then set up ssh remote port forwarding and send clipboard
data to this port.

You need either netcat (nc) or socat as well as xsel, xclip or wl-clipboard.

Server:
$ socat TCP-LISTEN:6789,reuseaddr,fork EXEC:"/usr/bin/xsel -ib"

SSH:
$ ssh user@xxxxxxxxxxx -R 6789:localhost:6789
Or set RemoteForward in your config.

copy on server:
$ uname -a | nc -c localhost 6789
or
$ uname -a | socat -u - TCP:localhost:6789

https://gist.github.com/dergachev/8259104

--
Andy



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux