You are not logged in.
I have a laptop running Xubuntu 22.04 that I frequently switch between a wired and wireless connection. Normally, this isn't a problem, but if I have a remote directory mounted via sshfs, then things start to break when I switch the connection. Most notably, Thunar has a tendency to freeze, and I have to forcibly kill all SSH processes to get it working again (or sometimes even restart the machine).
I don't want to have to remember to terminate all SSH sessions every time I switch a connection. Is there a way to either a) maintain the session when switching connections or b) gracefully closing all SSH sessions automatically when the connection is switched?
Offline
I have a remote directory mounted via sshfs
How exactly are you mounting the share? Have you tried the reconnect option?
Or potentially use network bonding?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
My mount command looks like this:
sudo sshfs -o allow_other user@xxx.xxx.xxx.xxx:/dir/on/remote /mount/point/on/local
I had done some research on the problem but somehow missed both of those links, so I'll investigate them further. Thanks!
Offline
So I've been trying out the following modification to my mount command:
sudo sshfs -o allow_other,reconnect user@xxx.xxx.xxx.xxx:/dir/on/remote /mount/point/on/local
Generally, one of two things now happens when I switch between wired and wireless: either a) Thunar works fine, but the mounted drive doesn't show any files, so I have to unmount and re-mount the drive, or b) Thunar still freezes, and I have to kill all active SSH connections and then unmount/remount.
Am I using the reconnect option correctly?
Offline
[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 531.7 KiB (Peak: 532.55 KiB) ]