You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用SCP从旧Cisco C3560G交换机向PC传输文件时遇多类错误,如何解决?

SCP从旧Cisco C3560G交换机向PC传输文件时遇多类错误,如何解决?

我来跟你唠唠解决这个问题的完整流程,都是实际操作中踩坑试出来的:

1. 遇到密钥交换算法不匹配的错误

Unable to negotiate with 10.14.16.15 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

旧款Cisco交换机用的密钥交换算法比较老,咱们的OpenSSH默认不支持,得在命令里手动指定启用这个算法:

./scp.exe -o KexAlgorithms=+diffie-hellman-group1-sha1 -pr admin@PAN-MGMT-01:c3560-ipbasek9-mz.122-53.SE C:\Users\sebastien.mansfeld\Desktop\Cisco\

2. 接着遇到加密套件不匹配的错误

Unable to negotiate with 10.14.16.15 port 22: no matching cipher found. Their offer: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc

同样的道理,交换机支持的加密套件也是旧版本的,咱们再给命令加上加密套件的参数:

./scp.exe -o KexAlgorithms=+diffie-hellman-group1-sha1 -o Ciphers=+aes256-cbc -pr admin@PAN-MGMT-01:c3560-ipbasek9-mz.122-53.SE C:\Users\sebastien.mansfeld\Desktop\Cisco\

3. 然后碰到SCP服务未启用的问题

Administratively disabled.

这时候得登录到C3560G交换机的命令行,开启SCP服务器功能:

ip scp server enable

4. 最后遇到参数不支持的错误

-p -r -d options not supported

旧款交换机的SCP服务不支持-pr这些参数,咱们把它们去掉就行,最终可用的命令示例:

./scp.exe -o KexAlgorithms=+diffie-hellman-group1-sha1 -o Ciphers=+aes256-cbc admin@PAN-MGMT-01:PAN-MGMT-01_autoconfig-20230818.txt P:\Desktop\Switches\WS-C3560G-48PS-S\

执行这个命令后,输入密码就能成功传输文件啦,你看示例里已经显示传输完成的进度条了~

备注:内容来源于stack exchange,提问作者SebMa

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 11:59:13