Sshfs is not working

I've found the same problem: when combining sshfs with sshpass, it only works if sshfs is running in foreground (either with -f or -d). If it's executed in background, it executes normally with exit value 0, but it won't mount anything.

The workaround I've found is executing sshfs in foreground mode, but sending it to background with the shell:

sshpass -f passwordfile sshfs -f origin destination &

This way it will work. Then, when you don't need the mount anymore and unmount it with fusermount -u, the sshfs process will end normally.

Tags:

Ssh

Sshfs