On 02Feb2024 11:29, bruce <badouglas(a)gmail.com> wrote:
But setting up ssh is no issue. My issue, I'm wondering how to
"run" a
cmd on srvr2 via ssh when I'm on srvr1.
How is:
ssh srvr2 the-command...
not enough? I feel that I'm missing some larger context here.
And a larger issue, is this
even the "right" way to handle testing "stuff" within Github?
Shrug. Why not? If you want to test "run some command on srvr2" and
you're orchestrating things from srvr1, the above ssh seems fine to me.
Obviously it glosses over the target user on srvr2 and the ssh key
setup, but you say you've got that side of things sorted.
Example: I've got a little script to twiddle our firewall's routing as
needed. It looks like this:
#!/bin/sh
set -ue
if [ $# = 0 ]
then ssh fw cat /etc/isp-state
else set-x ssh fw doas -u root isp.sh "$@"
fi
It just sshes to the firewall and runs the required command.
Cheers,
Cameron Simpson <cs(a)cskk.id.au>