I needed to locally edit remote files on my server, so I tried to mount the whole remote file system (/) on my local system with SSHFS like so:
$ sshfs :// /mnt -p 22Then it stuck (cursor blinking, no output), so obviously I cancelled it with Ctrl+C.
After that, the mount point folder /mnt became sort of unusable, unreachable (you name it) and kept returning me this error message on any attempt to access it:
fuse: bad mount point `/mnt': Transport endpoint is not connected
And it took this weird look in its parent folder:
$ ls -l /
...
d????????? ? ? ? ? ? mnt`
...How can I resolve the error and get back to normal?
What should I do to be able to use SSHFS?
1 Answer
1. Kill all sshfs processes
Either with
killallcommand:killall sshfsor selectively:
Find all running
sshfsprocesses:ps -ef | grep sshfs | grep -v grepSay you've got two of them running:
$ ps -ef | grep sshfs | grep -v grep root 10906 5170 0 07:14 pts/0 00:00:00 sudo sshfs root 10907 10906 0 07:14 pts/0 00:00:00 sshfsNow kill them both or selectively by identifying them by their PID:
sudo kill -9 10906 10907
2. Unmount your mount point
sudo umount -l /mnt3. Edit /etc/fuse.conf so you never meet the fuse: bad mount point `/mnt': Transport endpoint is not connected error again:
Open it as root with your favorite editor, for example
sudo atom /etc/fuse.conf- Uncomment the
user_allow_otherline. - Save and close.
4. Use SSHFS with the following options:
sudo sshfs \
-d \
-o allow_other \
-o reconnect \
-o ServerAliveInterval=15 \
:/ /mnt \
-p 12345 \
-C-dturns debug mode on (gives more output)-ostands for "option"-pallows you to specify port number-Cturns on compression