我需要在我的服务器上本地编辑远程文件,所以我尝试/使用 SSHFS 在我的本地系统上挂载整个远程文件系统 ( ),如下所示:
$ sshfs username@domain.com:// /mnt -p 22
Run Code Online (Sandbox Code Playgroud)
然后它卡住了(光标闪烁,没有输出),所以很明显我用Ctrl+取消了它C。
在那之后,挂载点文件夹/mnt变得不可用,无法访问(你命名它)并且在任何尝试访问它时不断向我返回此错误消息:
fuse: bad mount point `/mnt': Transport endpoint is not connected
它在其父文件夹中采用了这种奇怪的外观:
$ ls -l /
...
d????????? ? ? ? ? ? mnt`
...
Run Code Online (Sandbox Code Playgroud)
Kir*_*kow 19
sshfs进程要么使用killall命令:
killall sshfs
Run Code Online (Sandbox Code Playgroud)
或有选择地:
查找所有正在运行的sshfs进程:
ps -ef | grep sshfs | grep -v grep
Run Code Online (Sandbox Code Playgroud)
假设你有两个正在运行:
$ 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 sshfs
Run Code Online (Sandbox Code Playgroud)现在通过他们的 PID 识别他们,或者有选择地杀死他们:
sudo kill -9 10906 10907
Run Code Online (Sandbox Code Playgroud)
sudo umount -l /mnt
Run Code Online (Sandbox Code Playgroud)
/etc/fuse.conf以免fuse: bad mount point `/mnt': Transport endpoint is not connected再次遇到错误:例如,使用您最喜欢的编辑器以 root 身份打开它
sudo atom /etc/fuse.conf
Run Code Online (Sandbox Code Playgroud)user_allow_other行。sudo sshfs \
-d \
-o allow_other \
-o reconnect \
-o ServerAliveInterval=15 \
user@domain.com:/ /mnt \
-p 12345 \
-C
Run Code Online (Sandbox Code Playgroud)
-d 打开调试模式(提供更多输出)-o 代表“选项”-p 允许您指定端口号-C 打开压缩
| 归档时间: |
|
| 查看次数: |
38368 次 |
| 最近记录: |