snork.ca: Welcome to the brown age of computing! Mostly Cloudy, 10.3°C - Precip 21 hrs

I Am Going To Try sshfs 2022-01-18


So, typically when I make a new post here at snork.ca, I switch to the SSH session that I usually keep open and type newpost "title" "description" which is a little script I made. That script basically creates a new directory inside the "posts" directory and copies in a few files. It then spits out an entry I can paste in to my sitemap and another entry I can paste in to my feed.xml. The script works great, but then I have to open WinSCP which is a Windows-only application that I can use via wine in order to open, edit, and save the files that will make up the new post.

Merrygold Feels like a long time ago.

This is actually works pretty well, but having WinSCP open all the time so I can edit the remote files whenever I make a new post is kind of a pain. I'd actually like it if I could get rid of wine altogether (though I know that I'll need to keep it for Guild Wars and Notepad++). Anyways, today I am trying out sshfs to edit my post. I started by installing sshfs:

$ sudo apt-get install sshfs

... which told me it would remove fuse, and add fuse3. As a result, 388 kB of additional disk space was taken up on my PC. Sweet. Then I created a directory for fuse to mount the remote directory on:

$ mkdir ~/webserver

Then I connected to the remote server.

$ sshfs -p 1234 -o IdentityFile=/path/mykey root@servername:/path/www /path/webserver

Now I can just open the files directly in my file manager of choice, and edit the files as if they were right here on my desktop PC. Now, this isn't the first time I tried to do this, and I have found that with mildly unleliable Internet connections this can be a bit flakey. I am hopeful that fuse has made improvements since the last time I tried this and that it'll just work flawlessly. Okay, I'll quit holding my breath for now.

Made with Notepad++ and FastStone, hosted on Devuan with nginx, without javascript, google bullshit, CDN crap, or cookies, and powered by NK shrooms.