Sshfs Mounting with Fstab During Boot (Linux / Debian)

Sshfs Mounting with Fstab During Boot (Linux / Debian)

Is there anyone out there who can help me try to "translate" this SSHFS command to a proper fstab-line?

I already tried once and messed up with whole FSTAB and boot.

sshfs :/RemoteDirectory /mnt/localdirectory -p 1234 -o nonempty -o allow other

I have the network in "auto" mode for ETH0 so it should be up during boot and available for this "fstab sshfs".

SSHFS command is working and I can connect with it manually to a remote server.

After setting up a proper fstab, I still need to do something with authentication? Public/Private key authentication, right?

Thank you so much for your help with this issue.

1 Answer

The appropriate line in fstab would look like

:/RemoteDirectory    /mnt/localdirectory   fuse.sshfs nonempty,allow_other  0    2

As you indicated, prior to using this you need to have a public/private key relationship set up between the hosts without a password. You should set this up first, and check that sshfs works fine from the commandline.

(Also note that the option is allow_other not allow other)

0

Your Answer

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

Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.