I can now execute a script on a server from my local computer without having to SSH into it.

submitted by

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.

23
80

Back to main discussion

Parent comment

Thing is, IT like this isn’t anywhere near the main thrust of the (very) old school engineering firm I work for. The boss considers it enough that there’s a shared SMB server, though if questioned on it he’d admit that he’s got no idea how it works. Most of the computers are still running Windows 10. Mine is one of three that are running one form of Linux or another, the server is another. Almost all of the company’s money is made by the folks on the shop floor, swinging hammers and spanners.

So I saw a need for something and did what I could with what I know to make a first draft of it, and it works quite well. As time goes on, and it shows its worth, maybe we’ll employ someone who knows what they’re doing, someone who can make it a robust, modern answer. But for now my little hodge podge will work, albeit fairly manually.


Insert image