- SSHFS: Mounting a remote file system over SSH
- SSHFS: Mounting a remote file system over SSH
- Oh no! Some styles failed to load. šµ
- Subscribe to RSS
- Subscribe to RSS
SSHFS: Mounting a remote file system over SSH
By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. It only takes a minute to sign up. I have a remote sshfs drive that I use on a daily basis. I previously executed the following command every time I booted up my computer. Obviously, it's not super convenient to do that by hand every time, so I thought I'd just add the remote to my file systems table. Unfortunately, if there is a blip in the network, the drive sometimes goes down. This happens maybe once per day -- and when I try to manually reconnect by clicking on the drive in nautilusI'm given a message that says "Transport endpoint is not connected. My primary question is this: how can I bring the -o reconnect option that I used in the terminal command into my fstab file? I believe that would prevent the drive disconnect due to blips. Also, I chose that cipher because it's the quickest one my remote server supports I thinkand removed compression because the wired gigabit network is faster than the time taken by the CPU to compress stuff. It would be great if I could pull those options into my fstab as well, but I can live without them. To include the options you want, you should modify your fstab entry as shown below. Be careful, as adding an option that doesn't actually exist will cause your system not to boot. I took the liberty of adding the noauto option. This requests that the mount won't happen automatically, so that any failure will not stop the boot process particularly when using systemd. It relies on you having a convenient way of running mount. Hopefully your filemanager will provide this, otherwise it defeats the point Another possibility is the nofail option. This option requests a successful boot even if this filesystem fails to mount "this device if it does not exist". Ironically, using the nofail option here will guarantee failure. It is formatted as a comma-separated list of options. It contains at least the type of mount ro or rwplus any additional options appropriate to the filesystem type including performance-tuning options. For details, see mount 8 or swapon 8. Options which are completely filesystem-independent are handled by fstab. Other options are passed to the filesystem-specific command in this case, sshfs. Sign up to join this community. The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. Force reconnect on sshfs drive mounted via fstab Ask Question. Asked 4 years, 8 months ago. Active 1 year, 2 months ago. Viewed 6k times. Rui F Ribeiro Woodrow Barlow Woodrow Barlow 1 1 silver badge 15 15 bronze badges. So the command that you reference at the top of your post that you have to manually enter does the trick as far as you're concerned - with the obvious point that you have to retype it every time you boot? NOTE arcfour is no longer considered "safe".SSHFS: Mounting a remote file system over SSH

By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. It only takes a minute to sign up. I have several directories mounted through sshfs. I sometimes get disconnects from the server not configurable by me. I usually mount the directories like this. The mount is still visible when typing mount. When I type. Is there a better way to deal with this? Obviously sshfs should do the umount and clean up Ideally it would reconnect automatically. You can run sshfs with the "reconnect" option. 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. Just a note, if the remote computer is really down, sshfs may become unresponsive for a long time. This can be worked around by decreasing the timeout. I have a server that I use for storage and for some lack of space where I live, I keep it in another location. In order to bring the files into my network I use a raspberry pi that mount the files from the server using sshfs. Recently I had to upgrade to raspbian jessie due to a power failure and realised that sshfs become seriously unstable. The folders would be properly mounted but after some time I would not be able to connect to them and the raspberry pi would freeze if I wanted to list the contents of the mounts. And it works! No more disconnects! I looks like sshfs does not read the ssh config file for some reason and the keep alive signals were never sent. This sounds like a job for autofs. It's rather adept at handling network mounts of various kinds nfs, samba, sshfs, you name it and noticing when those things need re-mounting. It can also takes care of unmounting them after periods of disuse and mounting them when a file system request is made. If there are still people encountering this problem, I still could not fix it. I did find a working workaround. The following ruby script did the trick. It creates a folder called "keepalive" over and over. Just keep running this until infinity. I do not know why this works. But it seems to solve my problem where I am inactive for a minute and everything freezes. It just tries to create a folder at the mounting point and that seems to keep it from disconnecting and freezing everything somehow. Sign up to join this community. The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. What is a better way to deal with server disconnects of sshfs mounts? Ask Question.
Oh no! Some styles failed to load. šµ

By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. I use sshfs to connect to a remote server. When my computer goes to sleep or internet drops, sshfs tries to reconnect when the connection comes back, but does not ask me for a password. Because of this, the reconnect fails, and after several attempts my IP address is blocked indefinitely from connecting to the server until I convince them to unblock me. Overall this is completely untenable. How can I prevent sshfs from reconnecting? How are we doing? Please help us improve Stack Overflow. Take our short survey. Learn more. Prevent sshfs reconnecting Ask Question. Asked 4 days ago. Active 4 days ago. Viewed 8 times. Ben Southworth Ben Southworth 1 1 silver badge 8 8 bronze badges. Active Oldest Votes. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Q2 Community Roadmap. The Unfriendly Robot: Automatically flagging unwelcoming comments. Featured on Meta. Community and Moderator guidelines for escalating issues via new responseā¦. Feedback on Q2 Community Roadmap. Triage needs to be fixed urgently, and users need to be notified uponā¦. Technical site integration observational experiment live on Stack Overflow. Dark Mode Beta - help us root out low-contrast and un-converted bits. Related 2. Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled.
Subscribe to RSS

By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up. Very occasionally the connection will be broken if there's a power or Internet outtage, and in these cases I would have to recognise this has happened and manually reconnect using the same command. Is there a way I can get my Ubuntu Server to automatically attempt to reconnect, say every 30 seconds, if the connection goes down? I am duplicating it here. The result is that if the server is unavailable for 1 minute, sshfs will reconnect to the server. Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. Asked 4 years, 3 months ago. Active 4 years, 3 months ago. Viewed 19k times. Ozzah Ozzah 3 3 gold badges 7 7 silver badges 16 16 bronze badges. Active Oldest Votes. Seth Difley Seth Difley 6 6 silver badges 9 9 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Cryptocurrency-Based Life Forms. Q2 Community Roadmap. Featured on Meta. Community and Moderator guidelines for escalating issues via new responseā¦. Feedback on Q2 Community Roadmap. Linked 7. Related Hot Network Questions. Question feed. Ask Ubuntu works best with JavaScript enabled.
Comments on “Sshfs reconnect”