REMRUN(1) | General Commands Manual | REMRUN(1) |
remrun
— copy a
file to a remote host and execute it
remrun |
[-Nsv ] [--noop ]
[--stdin ] [--verbose ]
[-C local_cksum_command]
[-c remote_cksum_command]
destination filename
[args...] |
remrun |
[-V | --version |
-h | --help |
--features ] |
The remrun
utility copies the specified
file to the remote host using SSH under a temporary filename, executes it on
the remote side, then removes the temporary file. By default, the remote
program does not have access to the current process's standard input stream;
the -s
option has to be passed explicitly to enable
that.
As a special case, if “-” (a single dash) is passed
as the filename argument,
remrun
will read the contents of the standard input,
store it into a temporary file, and then copy and execute that file,
removing it afterwards. This is incompatible with the
-s
(--stdin
) option.
The remote host to transfer the file to may be specified in two ways: either as a [username@]host pattern, or as a ssh://[username@]host[:port][/] URI.
Note that the sha256sum(1) tool is used both
locally and remotely to make sure that the file has been transferred
correctly. Its use may be overridden for the local host by the
-C
option, and for the remote one by the
-c
option; both commands are passed to the shell, so
they may be comprised of more than one word, e.g. “sha256
-r”.
The remrun
utility accepts the following
command-line options:
-h
-N
-s
-V
-v
The operation of the remrun
utility is not
directly influenced by any environment variables.
The operation of the remrun
utility is not
directly influenced by the contents of any files.
Copy the whoami.sh file over to the “server” host, logging in as the “jrl” user account, then run it:
remrun jrl@server
whoami.sh
Do the same, but for a remote host that runs
FreeBSD and another command must be used instead of
sha256sum
:
remrun -c 'sha256 -r' jrl@server
whoami.sh
Specify the commands to run directly:
printf 'uname -a\ndate -R\n' | remrun
jrl@server -
The remrun
utility exits 0 on
success, and >0 if an error occurs.
No standards were harmed during the production of the
remrun
utility.
The remrun
utility was written by Peter
Pentchev in 2021.
Peter Pentchev ⟨roam@ringlet.net⟩
No, thank you :) But if you should actually find any, please report them to the author.
March 6, 2022 | Debian |