python - 使用 Fabric run 命令安装 sshfs 失败

标签 python ssh fabric sshfs

我正在尝试使用以下运行命令挂载 SSHFS

run("sshfs -o reconnect -C -o workaround=all localhost:/home/test/ /mnt")

并且失败并出现以下错误

fuse: bad mount point `/mnt': Transport endpoint is not connected

但是,如果我妖魔化它是有效的。有什么解决办法吗?

最佳答案

我最终发现 SSH 有问题,需要传递 pty=False 标志。

run("sshfs -o reconnect -C -o workaround=all localhost:/home/test/ /mnt",pty=False)

关于python - 使用 Fabric run 命令安装 sshfs 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24317368/

相关文章:

python - 如何解决逐帧保存视频的问题

python - 使用scipy对样本进行离散积分

python - 如何有效地将 NumPy View 列表与相应的权重相乘?

c# - 使用 sshnet 执行 unix 脚本

mysql - 我怎么能按顺序启动 mysql 和 tomcat,以及 Dockerfile 中的 SSH

linux - 无法通过 SSH 隧道克隆 git

git - 在部署期间将 git 修订号插入文件

python - 导入您自己的 Python 模块

python - 织物检查以查看文件是否有数据

python - 如何使用 Fabric 使其并行运行?