I can now execute a script on a server from my local computer without having to SSH into it.
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.