This is becoming increasingly annoying and borderline despairing:

I use sshfs to mount directories from remote servers. I work in a laptop with a docking station so I'm usually connected through ethernet. Many times I need to grab my laptop and go work in another location using the company's WIFI connection.
If i forget to "fusermount -u" all the different mounts, I need to restart the computer or at least logout login, which is very annoying and unproductive.

When i say everything is messe up i mean:

  • My console stops working if i do something as simple as 'ls'
  • I can't unmount either through the console or the File Browser
  • Consequently, i can't mount it again, therefore i can't work

Does anyone relate to this problem? and know of a good solution?

Thank you

  • This answer might be interesting. – MadMike Oct 14 '13 at 12:02
  • i've tried it and it works!!! want to add it as an answer, so i can accept it as the right one? thanks – André Alçada Padez Oct 14 '13 at 12:20

How to setup sshfs with the "reconnect" option

Pulled from this answer.

You can run sshfs with the "reconnect" option. We use sshfs with PAM/automount to share server files for each workstation in our network. We use -o reconnect as parameter for sshfs, mostly because our users suspended their computers and on wake sshfs would not reconnect (or respond, or anything).

For example:

sshfs mvaldez@ /home/mvaldez/RemoteDocs -o reconnect,idmap=user,password_stdin,dev,suid

Just a note, if the remote computer is really down, sshfs may become unresponsive for a long time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.