4

I ran across this error while trying to mount a remote file system to my local host using SSHFS.

The command I was using was in the form of:

sshfs root@remote:/path/to/dir ./localDir
  • I am logged into the local system as root
  • I have a valid SSH key to the remote... I can ssh root@remote and get a prompt
  • I tried setting permissions to both the source and destination 777 just for testing - same error
  • I found lots of similar error messages via search engines, but none of the "bad mount point" results also included "Permission denied." I think this is a distinct issue.
user984869
  • 161
  • 1
  • 5

2 Answers2

2

The destination (./local) directory was also a fuse mounted directory.

I didn't intend to mount inside a fuse mount, but it appears that if you do, you get a "permission denied" message instead of a more appropriate message.

user984869
  • 161
  • 1
  • 5
1

Don't ask me how I created this problem (the explanation is too long) but here's the solution that worked for me:

Let's say you launch sshfs from /example directory, you need to create a hidden ".ssh" folder with a known_hosts file inside that folder, like mkdir /example/.ssh. Then create or copy the known_hosts file into the .ssh directory. For whatever reason, if .ssh does not exist, you'll get the error "sshfs: bad mount point `exampledir': No such file or directory" (even if exampledir is there.)

Alternatively, you can just try a different directory and I assume the .ssh folder (with known_hosts) will be created automatically.

PS: I realize my error message is slightly different but I couldn't find a solution anywhere else and your error seemed close enough. I might create a separate question later on.

PJ Brunet
  • 586
  • 1
  • 5
  • 15