|
I'm running KDE Neon 5.14.3 on my laptop (so basicallu Ubuntu 18.04 LTS) and have a lovely buffalo NAS with a crap version of Samba that's several years old. To access the NAS from the internet I go via a Raspberry Pi which mounts the NAS over NFS. Only the SSH port to the Pi is accessible from the outside world. So on the laptop I have NFS mounts in /etc/fstab and that works great, but I'm wondering if there's some sensible way I can make these mounts use SSHFS when I'm away from home as I really can't be hosed with VPNs for this purpose. I guess I can manually mount them into the same place but does there exist any tool that can automate this, so the /nfs/blah mounts on my laptop basically always work if there is internet.
|
# ? Nov 28, 2018 00:21 |
|
|
# ? Jun 10, 2024 11:37 |
|
Do you have an iPhone? You can use Shortcuts to have your phone connect via SSH and run a script. Or am I missing something? It sounds needlessly complicated.
|
# ? Nov 28, 2018 01:49 |
|
crabcakes dogg posted:Do you have an iPhone? You can use Shortcuts to have your phone connect via SSH and run a script. No, I have a laptop running Linux (KDE Neon). SSHFS runs really slow on the LAN, so I only really want to use it when traveling.
|
# ? Nov 28, 2018 20:53 |
|
Write a mount helper script and save it to /sbin/mount.(type). The script could try an NFS mount first, and then fail over to SSHFS. Once you have it working, you should be able to use it as the filesystem type in /etc/fstab, or specify a #type argument. Here's an example of the syntax for a mount-helper: https://github.com/ncw/rclone/wiki/rclone-fstab-mount-helper-script oh, also - if you put it in your fstab, you probably want these options: "noauto,nofail,_netdev,x-systemd.automount" and also maybe "nobootwait" Poopernickel fucked around with this message at 19:33 on Nov 29, 2018 |
# ? Nov 29, 2018 19:27 |