Changes
Page history
howto/cumin: add ssh param for local port forward
authored
Aug 07, 2024
by
lelutin
...in case folks don't have that in their ssh config already
Show whitespace changes
Inline
Side-by-side
howto/cumin.md
View page @
993be128
...
@@ -82,7 +82,7 @@ Description=Setup port forward to puppetdb
...
@@ -82,7 +82,7 @@ Description=Setup port forward to puppetdb
After
=
network.target
After
=
network.target
[Service]
[Service]
ExecStart
=
/usr/bin/ssh -nNT -o ExitOnForwardFailure=yes puppetdb-01.torproject.org
ExecStart
=
/usr/bin/ssh -nNT -o ExitOnForwardFailure=yes
-L 8080:localhost:8080
puppetdb-01.torproject.org
KillMode
=
mixed
KillMode
=
mixed
```
```
...
@@ -91,6 +91,10 @@ With this in place, make sure that systemd has loaded this unit file:
...
@@ -91,6 +91,10 @@ With this in place, make sure that systemd has loaded this unit file:
systemd --user daemon-reload
systemd --user daemon-reload
Note: if you already have a line
`LocalForward 8080 127.0.0.1:8080`
under a
block for host puppetdb-01.torproject.org in your ssh configuration, you can
safely drop the
`-L`
argument in the ssh command in the systemd unit above.
The last missing piece is to create something that'll intercept
`cumin`
commands
The last missing piece is to create something that'll intercept
`cumin`
commands
and check whether your tunnel to puppetdb is currently listening and if not,
and check whether your tunnel to puppetdb is currently listening and if not,
start the tunnel before handing your arguments to the actual
`cumin`
command.
start the tunnel before handing your arguments to the actual
`cumin`
command.
...
...
...
...