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

[openwrt] ash: /usr/libexec/sftp-server: not found scp: Connection closed

 

 scp luci-app-openclash_0.47.028_all.ipk root@10.10.2.3:/root

root@10.10.2.3's password:

ash: /usr/libexec/sftp-server: not found

scp: Connection closed

 

 

The error "ash: /usr/libexec/sftp-server: not found" followed by "scp: Connection closed" occurs because your client machine (the computer you are running the scp command from) is using a newer version of OpenSSH (typically v9.0 or later).

Newer OpenSSH clients use the SFTP protocol by default for scp transfers, but the OpenWrt router uses the lightweight Dropbear SSH server, which typically only supports the legacy SCP protocol and does not include the separate sftp-server binary required by the new clients.

You have two main solutions: the easy client-side fix or the OpenWrt package fix.


 

1. Easy Fix: Use the Legacy SCP Protocol (Recommended) ✅

 

The simplest and most immediate fix is to tell your client's scp command to fall back to the old, legacy SCP protocol by adding the -O (uppercase 'o') flag.

Your original command:

Bash
 
scp luci-app-openclash_0.47.028_all.ipk root@10.10.1.3:/root

The fixed command:

Bash
 
scp -O luci-app-openclash_0.47.028_all.ipk root@10.10.1.3:/root

This forces the client to use the older, universally supported SCP transfer method, which works with the default Dropbear server on OpenWrt.


 

2. OpenWrt Fix: Install the SFTP Server 📦

 

If you prefer to enable the newer SFTP protocol on your router (useful for graphical SFTP clients like WinSCP or FileZilla), you need to install the openssh-sftp-server package on your OpenWrt router.

  • Step 1: SSH into your OpenWrt router.

    Bash
     
    ssh root@10.10.1.3
    
  • Step 2: Update packages and install the SFTP server.

    (You must have a working internet connection for this.)

    Bash
     
    opkg update
    opkg install openssh-sftp-server
    

    If opkg update fails due to an SSL error, you may need to resolve that first (e.g., check your router's date/time) or temporarily use opkg update --no-check-certificate.

  • Step 3: Log out of the router and try your original scp command again.

    Bash
     
    exit
    scp luci-app-openclash_0.47.028_all.ipk root@10.10.1.3:/root
    

With the sftp-server package installed, your modern scp client will successfully find the necessary binary to complete the transfer using the SFTP protocol.

Next Step: Please try the -O flag fix first. Let me know if that works, or if you need assistance installing the package on your router.

 

http://www.jsqmd.com/news/30561/

相关文章:

  • [openwrt]OpenWRT换成清华源
  • [OpenWRT/LEDE] a short history of OpenWRT
  • 生成式模型分类
  • 2025年11月学生平板品牌对比榜:新课标适配与错题管理实力榜
  • 2025年11月学生平板品牌推荐:全维度评测榜看清北直播课与AI题库
  • 2025年11月学生平板品牌评测:读书郎T5系列与四款竞品实力排行
  • 2025年11月卖得好的学习机品牌推荐:家长榜评价
  • 2025年11月适合小学生的学习机品牌推荐:热门机型排行与实测
  • 2025年11月卖得好的学习机品牌推荐:市场榜五强评测
  • 2025年11月卖得好的学习机品牌推荐:实力榜排行与真实评价汇总
  • 2025年11月适合小学生的学习机品牌推荐:最新榜单对比评测与真实口碑排行
  • AI元人文:价值权衡的计算理论与共识涌现新范式
  • 2025年北京债务债权律师事务所权威推荐榜:专业债务纠纷处理与债权追索法律服务口碑之选
  • 2025年北京股权纠纷律师事务所权威推荐榜:股权转让/股东争议/公司控制权纠纷专业律师团队精选
  • 2025年北京合同纠纷律师事务所权威推荐榜:专业律师团队与胜诉率口碑深度解析
  • 2025年北京分家析产律师事务所权威推荐榜:专业房产分割与遗产继承法律服务口碑之选
  • 2025年北京遗产继承律师事务所权威推荐榜:专业遗嘱继承、房产继承、涉外继承法律服务团队深度解析
  • 2025年北京婚姻家事律师事务所权威推荐榜:专业离婚诉讼、财产分割、子女抚养法律服务机构精选
  • 2025年北京房产律师事务所权威推荐榜:房屋买卖纠纷/房产过户/合同审查专业律所精选指南
  • 2025 年 11 月铝排/铝棒/铝板厂家推荐排行榜,1060铝排/1070铝排/导电铝排,6061铝棒/6063铝棒/6082铝棒,5083铝板/5052铝板/6082铝板公司推荐
  • 2025 年 11 月紫铜排厂家推荐排行榜,T2紫铜排/导电紫铜排/镀锡紫铜排/TMY铜排/导电铜母线/导电铝母线/T2紫铜板棒带/脱脂紫铜管/医用紫铜管公司推荐
  • 【AI说Rust 02】如何在 windows11 系统搭建 Rust 开发环境
  • window下安装python解释器和python的编辑器pycharm
  • 【比赛游记】2025 ICPC 武汉站游记
  • 群晖安装打印服务器,驱动HP P1106札记(三)—— 客户端配置
  • 2025年11月优质太空舱铝板供应商排名:工厂实力与用户评价深度解析
  • 2025年11月太空舱铝板生产厂家推荐排行:专业品牌口碑评测报告
  • 2025年11月有实力太空舱铝板生产厂家榜单:服务与成本深度评测
  • 2025年11月太空舱铝板供应商排名:专业对比与实地考察报告
  • 团队项目博客 PQ v.Net