SSHFS mounting with FSTAB during boot (Linux / Debian)

1

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 user@remoteserver.com:/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.

Kim Hiekkanen

Posted 2017-11-03T06:06:29.207

Reputation: 11

Answers

0

The appropriate line in fstab would look like

user@remoteserver.com:/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)

davidgo

Posted 2017-11-03T06:06:29.207

Reputation: 49 152