LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   SSHFS dropping connection (https://www.linuxquestions.org/questions/linux-software-2/sshfs-dropping-connection-744268/)

xri 07-31-2009 08:55 PM

SSHFS dropping connection
 
I'm using sshfs to connect to my office computer from home.
To connect, I use:

Quote:

$ sshfs -p 8922 -o sshfs_sync -o reconnect dungeon:/media/data /home/xri/tables

Whenever I leave the connection alone for more than 3 min, the folders I had on the desktop are not longer accessible ("directory data does not exist").
However, the mount command still shows the remote mount as working.

So, what I have to do is:

Quote:

$ fusermount- u /home/xri/tables
$ sshfs -p 8922 -o sshfs_sync -o reconnect dungeon:/media/data /home/xri/tables

This never happens when I use sshfs 'at home', that is within my LAN. However, it does happen when I do that between my home and my office.

By the way,
  • while fish:// works on my LAN, it does not work when I try, on Konqueror,
    Quote:

    fish://xri@dungeon:9922
    In this case I get "The process for the fish://dungeon protocol died unexpectedly";
  • I can use ssh without a problem with key authentication.

Questions:
  1. Am I missing something important?
  2. Is there a better alternative?

Thanks for reading this.

xri 08-07-2009 07:07 PM

I fixed it.
For the the records, it was like this.
A possible reason for the different performance in the two different settings (ie within the local network vs. between computers across the Internet) is the presence of firewall between the computers in the second case. The firewall limits the communication and causes interruption of ssh.
The solution is to add, on the client's ssh config:

ServerAliveInterval number_in_seconds
ServerAliveCountMax times_unanswered_signals

For more details, man ssh. The keywords for googling are ssh keepalive.


All times are GMT -5. The time now is 05:16 PM.