README.md (1927B)
- # sshpaste
- A POSIX shell script (with some non-POSIX dependencies) inspired by wgetpaste but for pushing to your own server.
- ## Usage
- Please modify ``target_ssh`` and ``target_www`` into ``sshpaste`` to the appropriate servers and paths for your usage.
- ```
- Usage: sshpaste [options] [file(s)]
- Options:
- -c COMMAND paste COMMAND and the output of COMMAND
- Can be used only once, not compatible with -x
- -h show this help
- -x read input from clipboard (requires xclip)
- Can be used only once, not compatible with -c
- When no options or files are given, sshpaste reads from stdin, it assumes plain text is given and so puts a .txt extension
- ```
- ## Intended differences with wgetpaste
- * The URL in standard output shows only the URL without any message, allowing more easy piping
- * ``emerge --info`` options will not be added (gentoo-specific, can easily be done via ``-c``)
- * URL will not go to tinyurl or X Clipboard, can easily be done by piping the output
- * I use the PS4 environment variable with ``sh -x``/``set -x`` instead of a custom PS1, it allows the separation of the commands as they are executed at the expense of broken oneliner display
- ## Dependencies
- * POSIX system: required
- * scp(1): required; tested with OpenSSH
- * mktemp(1): needed for -x and -c; tested with coreutils and OpenBSD
- * xclip(1): optionnal; needed for -x option
- Note: Your server needs a ssh daemon for the uploads and a web server for hosting the files. You can also replace the web server with one for Gopher, FTP (but let it die) or maybe even something else.
- ## Packages
- * Source tarballs are available at https://hacktivis.me/git/sshpaste/archives/ and https://github.com/lanodan/sshpaste/releases
- * It is in my gentoo overlay, here is theorically how to install sshpaste from a clean gentoo:
- ```
- emerge layman
- layman -a lanodanOverlay
- emerge sshpaste
- ```