当前位置: 首页 > news >正文

解决sshfs挂载报错

使用ssh命令和sshfs命令报错 read: Connection reset by peer

root@jiangcheng01:~/common/remote# sshfs -o allow_other htrd@xxx.xxx.xxx.xxx:/home/htrd /root/common/remote/dev01 read: Connection reset by peer

报错问题排查,追加命令 -o debug -o sshf s_debug

root@jiangcheng01:~/.ssh# sshfs -o allow_other htrd@xxx.xx.xxx.xx:/home/htrd /root/common/remote/dev01 -o debug -o sshf s_debug SSHFS version 2.10.0 FUSE library version: 2.9.9 nullpath_ok: 0 nopath: 0 utime_omit_ok: 0 executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-2> <htrd@xxx.xx.xxx.xx> <-s> <sftp> Unable to negotiate with xxx.xx.xxx.xx port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss read: Connection reset by peer

发现问题 ssh-rsa,ssh-dss ,这两个算法,根据网上解决方案,具体的解决方案如下,在命令中新增HostKeyAlgorithms=+ssh-dss

sshfs -oHostKeyAlgorithms=+ssh-dss htrd@xxx.xx.xxx.xx:/home/htrd /root/common/remote/dev01

eg.取消挂载的命令

root@jiangcheng01:~# fusermount -u ~/common/remote/dev01

挂载之后可以使用 exeplorer.exe 打开挂载的文件夹,但是可能也会报错,我今天试了一下,这个命令之前是好的,但是现在不可用了,解决方案1是 加上完整的路径,具体如下所示:

root@jiangcheng01:~/common/remote# cd dev01/ root@jiangcheng01:~/common/remote/dev01# explorer.exe . explorer.exe: command not found root@jiangcheng01:~/common/remote/dev01# explorer.exe . explorer.exe: command not found root@jiangcheng01:~/common/remote/dev01# /mnt/c/windows/explorer.exe . root@jiangcheng01:~/common/remote/dev01#

解决方案2是

echo 'PATH=$PATH:/mnt/c/windows' >> ~/.bashrc

或者修改 ~/.bash_aliases

alias start='/mnt/c/windows/explorer.exe'

http://www.lryc.cn/news/90113.html

相关文章:

  • 由于过多的连接错误而被 MySQL服务器 阻止
  • Go语言实现JDBC
  • ubuntu修改环境变量的几种方法
  • 基于html+css的图展示95
  • 数据库基础——5.运算符
  • JMeter 性能测试基本过程及示例
  • 漏洞复现 CVE-2018-2894 weblogic文件上传
  • 二叉树:填充每个节点的下一个右侧节点指针(java)
  • Android 12.0修改系统默认设备类型的平板电脑类型为设备类型
  • debug研究
  • zabbix监控系统
  • Python入门学习
  • 自动驾驶嵌入式开发工程师:车载SOC开发修炼秘籍
  • Linux之搭建环境
  • 泡利矩阵(一)
  • 通用支付系统设计
  • metaRTC+ZLMediaKit实现webrtc的推拉流
  • 【JavaSE】Java基础语法(八)
  • Java如何配置环境变量
  • android 12.0SystemUI 状态栏下拉快捷添加截图快捷开关
  • 【无标题】 Vue 路由库Router 【重点】 - 安装 - 基本使用 - 路由配置 - 路由模式 - 路由传递参数 - 路由内置对象 - 路由守卫
  • RocksDB笔记 -- 整体架构
  • 设计模式之单例模式入门介绍
  • RHCE 作业三
  • 90.qt qml-Table表格组件(支持表头表尾固定/自定义颜色/自定义操作按钮/插入排序)
  • android 12.0SystemUI屏蔽某个app的通知
  • 注意力机制(一)SE模块(Squeeze-and-Excitation Networks)论文总结和代码实现
  • L2-001 紧急救援(dijkstra算法练习)
  • redis问题汇总
  • 调用华为API实现情感分析