更新rclone配置以支持diffie-hellman-group-exchange-sha256和diffie-hellman-group-exchange-sha1
来源:stackoverflow
时间:2024-03-28 08:12:30 442浏览 收藏
最近发现不少小伙伴都对Golang很感兴趣,所以今天继续给大家介绍Golang相关的知识,本文《更新rclone配置以支持diffie-hellman-group-exchange-sha256和diffie-hellman-group-exchange-sha1》主要内容涉及到等等知识点,希望能帮到你!当然如果阅读本文时存在不同想法,可以在评论中表达,但是请勿使用过激的措辞~
一些简单的背景知识。我使用 rclone
将数据传输到 SFTP 服务器。 rclone 是用 Golang 编写的,并在底层使用 lib crypto
。当我们尝试与 SFTP 服务器建立 ssh 连接时,我们收到错误消息
无法连接 SSH: ssh: 握手失败: ssh: 没有通用算法 用于密钥交换;客户提供:[[电子邮件受保护] ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1 diffie-hellman-group1-sha1],服务器 提供:[diffie-hellman-group-exchange-sha256 diffie-hellman-group-exchange-sha1]。
crypto
lib 大约 3 周前添加了对 diffie-hellman-group-exchange-sha256 diffie-hellman-group-exchange-sha1
的支持,但需要选择加入。 (参见https://github.com/golang/crypto/commit/57b3e21c3d5606066a87e63cfe07ec6b9f0db000)
显然,最新的 rclone 版本尚未选择加入这些算法支持。所以问题是:任何人都知道如何配置 rclone 以选择对 diffie-hellman-group-exchange-sha256 diffie-hellman-group-exchange-sha1
的算法支持
解决方案
我们已成功选择加入这些算法支持并在此处提交了 pr:https://github.com/ncw/rclone/pull/3341
注意:由于这些算法被认为是不安全的,因此您还需要使用现有的 rclone 标志 --sftp-use-insecure-cipher
以使它们可用于 ssh 握手。
交互式 rclone config
现在还提供启用不安全的密码:
Enable the use of insecure ciphers and key exchange methods. This enables the use of the following insecure ciphers and key exchange methods: - aes128-cbc - aes192-cbc - aes256-cbc - 3des-cbc - diffie-hellman-group-exchange-sha256 - diffie-hellman-group-exchange-sha1 Those algorithms are insecure and may allow plaintext data to be recovered by an attacker. Enter a boolean value (true or false). Press Enter for the default ("false"). Choose a number from below, or type in your own value 1 / Use default Cipher list. \ "false" 2 / Enables the use of the aes128-cbc cipher and diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1 key exchange. \ "true" use_insecure_cipher> 2
好了,本文到此结束,带大家了解了《更新rclone配置以支持diffie-hellman-group-exchange-sha256和diffie-hellman-group-exchange-sha1》,希望本文对你有所帮助!关注golang学习网公众号,给大家分享更多Golang知识!
-
502 收藏
-
502 收藏
-
501 收藏
-
501 收藏
-
501 收藏
-
139 收藏
-
204 收藏
-
325 收藏
-
477 收藏
-
486 收藏
-
439 收藏
-
357 收藏
-
352 收藏
-
101 收藏
-
440 收藏
-
212 收藏
-
143 收藏
-
- 前端进阶之JavaScript设计模式
- 设计模式是开发人员在软件开发过程中面临一般问题时的解决方案,代表了最佳的实践。本课程的主打内容包括JS常见设计模式以及具体应用场景,打造一站式知识长龙服务,适合有JS基础的同学学习。
- 立即学习 542次学习
-
- GO语言核心编程课程
- 本课程采用真实案例,全面具体可落地,从理论到实践,一步一步将GO核心编程技术、编程思想、底层实现融会贯通,使学习者贴近时代脉搏,做IT互联网时代的弄潮儿。
- 立即学习 508次学习
-
- 简单聊聊mysql8与网络通信
- 如有问题加微信:Le-studyg;在课程中,我们将首先介绍MySQL8的新特性,包括性能优化、安全增强、新数据类型等,帮助学生快速熟悉MySQL8的最新功能。接着,我们将深入解析MySQL的网络通信机制,包括协议、连接管理、数据传输等,让
- 立即学习 497次学习
-
- JavaScript正则表达式基础与实战
- 在任何一门编程语言中,正则表达式,都是一项重要的知识,它提供了高效的字符串匹配与捕获机制,可以极大的简化程序设计。
- 立即学习 487次学习
-
- 从零制作响应式网站—Grid布局
- 本系列教程将展示从零制作一个假想的网络科技公司官网,分为导航,轮播,关于我们,成功案例,服务流程,团队介绍,数据部分,公司动态,底部信息等内容区块。网站整体采用CSSGrid布局,支持响应式,有流畅过渡和展现动画。
- 立即学习 484次学习