clipat

Crates.ioclipat
lib.rsclipat
version0.1.1
sourcesrc
created_at2024-04-18 22:00:09.073568
updated_at2024-04-19 16:23:09.667727
descriptionCLI tool for sharing clipboard with remote SSH sessions
homepage
repositoryhttps://github.com/SamiKalliomaki/clipat
max_upload_size
id1212976
size47,543
Sami Kalliomäki (SamiKalliomaki)

documentation

README

clipat - Remote clipboard server / client

Allows sharing clipboard with remote SSH sessions.

Similar to lemonade.

Installation

  1. Install Rust.
  2. Install clipat:
    cargo install clipat
    

Usage in shell

  1. Run server on local machine:

    clipat server
    
  2. Set up SSH session with remote machine:

    ssh -R 14573:127.0.0.1:14573 user@remote
    
  3. To copy text on a remote machine:

    cat copy.txt | clipat copy
    
  4. To paste text on a remote machine:

    clipat paste > paste.txt
    

Usage with neovim

This will replace your + and * registers with clipat.

vim.g.clipboard = {
  name = 'clipat',
  copy = {
    ['+'] = { 'clipat', 'copy' },
    ['*'] = { 'clipat', 'copy' },
  },
  paste = {
    ['+'] = { 'clipat', 'paste' },
    ['*'] = { 'clipat', 'paste' },
  },
  cache_enabled = false,
}

Security considerations

By default, clipat only listens on 127.0.0.1. If you want to listen on all interfaces, you can use the --listen option. This is not recommended, as it allows anyone on the network to access your clipboard.

It is also not recommended to use clipat on multi-user systems, as any user could potentially access your clipboard.

Communications between the client and server are not encrypted. However, if you pipe the connection through SSH, this will take care of encryption over internet.

License

clipat is licensed under the MIT license. Full license text is available in the LICENSE file.

Commit count: 5

cargo fmt