sshfs icon indicating copy to clipboard operation
sshfs copied to clipboard

Allow to set global config in /etc/sshfs.conf

Open baryluk opened this issue 2 years ago • 2 comments

I often use sshfs on livecd (that I build), or to many other computers, and often need a bunch of parameters (caching, reconnects, keep alive, other_allow, max_conns, etc), every time. I sometimes do create bash aliases or custom script for this, but I sometimes forget.

I would really love to have /etc/sshfs.conf which has extra arguments that are parsed first by sshfs.

Currently it looks like there is no way do do this, other than maybe providing own sshfs script in /usr/local/bin/

sshfs 3.7.3-1.1, Debian testing

baryluk avatar Dec 25 '23 02:12 baryluk

If I understand the suggestion correctly, the SSHFS code would check the config file for stuff like max_conns=5, so that you don't have to redo that everytime.

But I am a little confused as to how this suggestion would handle something like SSHOPT ChannelTimeout, as that relates back to ssh config.

I haven't contributed to this repo before, but it seems like a cool suggestion I could take on, just want to make sure I understand the nuances.

EbiSadeghi avatar Apr 02 '24 05:04 EbiSadeghi

If I understand the suggestion correctly, the SSHFS code would check the config file for stuff like max_conns=5, so that you don't have to redo that everytime.

Yes exactly.

For example I usually have -o allow_other -o reconnect -o ServerAliveInterval=7 -o dir_cache=yes -o transform_symlinks , and sometimes also -o max_conns=8 or similar. And put custom wrapper script called sshfs in /usr/local/bin/ so that adds these options, otherwise I do forgot, and then you find hours later that there are issues (like broken mount points).

baryluk avatar Apr 13 '24 21:04 baryluk