2023-02-03
sinstall - Install local files on a remote host over SSH
sinstall [OPTION] SOURCE... REMOTE:DEST
sinstall [OPTION] -t REMOTE:DIRECTORY SOURCE...
sinstall [OPTION] -d REMOTE DIRECTORY...
The sinstall program installs local files on remote hosts.
In the first two forms, copy SOURCE to DEST on REMOTE or multiple SOURCE(s) to the existing DIRECTORY on REMOTE, while setting permission modes and owner/group. In the third form, create all components of the given DIRECTORY(ies) on REMOTE.
The REMOTE expression is passed to ssh(1) and can be either a host or a host alias from the ssh_config(5), optionally preceeded by a USER@. A port specification is not supported (see Requirements).
The sinstall script supports the same options (listed below) as the busybox install implementation, which are also supported by GNU install. Hence, the commands should look a lot like install(1). In fact, sinstall will execute install on the remote host.
A few requirements must be met for sinstall to work.
One of the main goals of sinstall to require very few depencenies on the remote host. It must have a POSIX shell, tar(1), mktemp(1), and install(1) (busybox or GNU). The local host must have (in addition to sinstall) a POSIX shell and tar.
Both sides require SSH. The local user must have passwordless login set up on the remote host. SSH must also be configured to not require a port in the REMOTE expression (see ssh_config(5)).
Certain actions will require super-user permissions on the remote host. This can be either by logging in as root or by using --sudo or --doas. The latter will require sudo(8) or doas(1) respectively on the remote host. The local user must again have passwordless execution of these set up.
-d REMOTE
Treat all arguments as directory names to be created on REMOTE; creates all components of the specified directories
-D
Create all leading components of DEST except the last, or all components of the DIRECTORY passed to -t
-s
Strip symbol tables
-p
Preserve date (currently mtime only)
-o USER
Set ownership (requires super-user); USER must be an existing user or UID on the remote host
-g GROUP
Set group ownership; GROUP must be an existing group or GID on the remote host
-m MODE
Set permissions (like chmod)
-t REMOTE:DIRECTORY
Install all SOURCE arguments to DIRECTORY on REMOTE
--doas
Use doas on remote host
--sudo
Use sudo on remote host
--debug
Run remote shell with -x
-h, --help
Show usage summary and exit
install(1)
This project is maintained by Conrad Hoffmann <ch@bitfehler.net>. The source code can be found at https://git.sr.ht/~bitfehler/sinstall. Bugs or patches can be submitted by email to ~bitfehler/public-inbox@lists.sr.ht.