Copy/Paste Anything Over Network

Server Setup

$ wget https://github.com/jedisct1/piknik/releases/download/0.9/piknik-linux_x86_64-0.9.tar.gz

$ tar xzf piknik-linux_x86_64-0.9.tar.gz -C /usr/local/bin/ --strip 1 linux-x86_64/piknik

$ piknik -genkeys
# Configuration for a client
# Configuration for a server
# Hybrid configuration

$ systemctl daemon-reload
$ systemctl start piknik
$ systemctl enable piknik
# /etc/piknik.toml
Listen = "0.0.0.0:8075" # Edit appropriately  
Psk    = "18d159b5fde9ba854a0d514e3b569391f12a8fac24c16779dd06305bdd0d13b2"  
SignPk = "6da408dad2366107ecac663f70e0d3db0d64b44cde9c4eec3a0cf65e0a89de9d"  
# /etc/systemd/system/piknik.service
[Unit]
Description=Copy/paste anything over the network  
After=network.target

[Service]
ExecStart=/usr/local/bin/piknik -config /etc/piknik.toml -server  
Restart=on-failure

[Install]
WantedBy=multi-user.target  

Client Setup

$ wget https://github.com/jedisct1/piknik/releases/download/0.9/piknik-linux_arm-0.9.tar.gz

$ tar xzf piknik-linux_arm-0.9.tar.gz -C /usr/local/bin/ --strip 1 linux-arm/piknik

$ source ~/.bashrc

$ pkc
hello world  
^D

$ pkp
hello world

$ pkm
hello world

$ pkm
The clipboard might be empty  
# ~/.piknik.toml
Connect   = "easypi.info:8075"  # Edit appropriately  
Psk       = "18d159b5fde9ba854a0d514e3b569391f12a8fac24c16779dd06305bdd0d13b2"  
SignPk    = "6da408dad2366107ecac663f70e0d3db0d64b44cde9c4eec3a0cf65e0a89de9d"  
SignSk    = "292a1d57a205af9feef05c651a44132a06dd3c7858a08b6495c1bba49ad493bf"  
EncryptSk = "908b1b41e64c53c5d9924e894c2af7d765bbd2c17635c9589cf2b43f0334b279"  
# ~/.bashrc

# pkc : read the content to copy to the clipboard from STDIN
alias pkc='piknik -copy'

# pkp : paste the clipboard content
alias pkp='piknik -paste'

# pkm : move the clipboard content
alias pkm='piknik -move'

# pkz : delete the clipboard content
alias pkz='piknik -copy < /dev/null'