[Bug 3509] New: implement RemoteCommandCommand

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Mon Dec 12 17:20:44 AEDT 2022


            Bug ID: 3509
           Summary: implement RemoteCommandCommand
           Product: Portable OpenSSH
           Version: 9.1p1
          Hardware: Other
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Miscellaneous
          Assignee: unassigned-bugs at mindrot.org
          Reporter: calestyo at scientia.org


For some configuration options which specify a file, we also have a
corresponding one specifying a command, namely:

I would find it useful, if something similar could be offered for
RemoteCommand (well that's the one I'd have a use case for - for
LocalCommand it doesn't really make sense anyway).

I have some special configurations that set a quite large RemoteCommand
(which starts a remote systemd unit for a VNC server, sets traps on
INT/EXIT/QUIT to stop the server, but a special one for HUP, so that it
can be left running, and later reconnected to, if just the connection
dies... well and it does some more stuff).

AFAICS there is no site limit for the RemoteCommand, but it's still
quite messy to edit within ssh_config.

So one solution would be to have a RemoteCommandCommand, which itself
is executed locally and gives back some string that ssh would use as
RemoteCommand (executed remotely).

Simply reading a script could be done via a RemoteCommandCommand like
"cat myscript.sh".

I'm not sure whether the remote command  could contain in principle
newlines (and just the limitations of RemoteCommand prevent these.
If it can (which I guess9, any script would already work, if not, then
one could perhaps give an example command that "serialises" a script,
though I think that's actually not easy,... at least it's not enough to
replace any newline with ';'.


You are receiving this mail because:
You are watching the assignee of the bug.

More information about the openssh-bugs mailing list