Swansong

For mental health, I have been working on final tweaks to my monitoring scripts.

I moved them to a Raspberry Pi, so I could work on the phone system without disrupting monitoring.

The temperature monitoring script writes to a log every minute and I was concerned about stressing the storage, a micro SD card.

The long term permanence of this log is not important, as it is erased every day after the report is generated.

After some poking around, the easiest solution I found was to place the log file in /dev/shm.

Problem is that fine systemd clears /dev/shm, when a regular user logs out.

Solultion? edit /etc/systemd/logind.conf.

Change:
#RemoveIPC=yes
to
RemoveIPC=no

from: https://superuser.com/questions/1117764/why-are-the-contents-of-dev-shm-is-being-removed-automatically

More to follow…

ssh jump host

It’s claimed all over the Internet, here for example, that below works.

ssh -J username@host1:port username@host2:port

You’ll get an error like this:

Bad stdio forwarding specification 'username@host2:port:22'
ssh_exchange_identification: Connection closed by remote host

You have to specify the destination host port with the -p option.

ssh -pdestination_host_port -J username@jumphost:port username@destination_host