I can now execute a script on a server from my local computer without having to SSH into it.
I’m not a programmer, and don’t really know that much about these things, but I’ve got an equipment dashboard at work running on an old ThinkPad I found in a cupboard.
Whenever someone takes an item of lifting gear I have to use SFTP to open the .csv register that’s held on the server, update it to include the gear that’s just been issued, then I have to SSH into the server, cd to the script’s location, then execute it.
But today I’ve worked out how to use sshfs to mount the database location on my local machine, have created a bash alias to execute the script on the server, and have connected the two computers with an SSH key. So updating the register is as easy as just opening the .csv in a local folder, then to execute the script to send the changes to the database I just type “lifting-gear” into a terminal window, and that’s that.
All that working out has taken me several hours, but it’ll save me a good minute or two every few weeks, so I consider that time well spent.
PieFed
Share on Mastodon
My Linux journey over the past 18 months has been Mint > KDE Neon > Kubuntu > Debian.
Well, Kubuntu for the machines I use, but Debian for a couple of servers I run. The one at work, but also my main server at home; an old Mac Mini. It may only have 8GB RAM, but I’ve got it running a bunch of different services and it’s 99% stable. Got a bit wobbly when I imported all of my iCloud photo library into Immich, but I soon worked out to do it a bunch at a time. Importing 50 photos and watching HTOP as all four CPU cores suddenly spiked to 100% was quite the experience.