【问题标题】:config rclone to support diffie-hellman-group-exchange-sha256 diffie-hellman-group-exchange-sha1配置 rclone 以支持 diffie-hellman-group-exchange-sha256 diffie-hellman-group-exchange-sha1
【发布时间】:2019-07-10 10:01:16
【问题描述】:

一些快速的背景。我使用rclone 将数据传输到 SFTP 服务器。 rclone 是用 Golang 编写的,并在底层使用 lib crypto。当我们尝试与 SFTP 服务器建立 ssh 连接时,我们收到错误消息

无法连接 SSH:ssh:握手失败:ssh:没有通用算法 用于密钥交换;客户提供:[curve25519-sha256@libssh.org 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

【问题讨论】:

  • github.com/ncw/rclone/issues/1810 引用了这个问题。由于您没有给出显示此问题的完整最小示例,我将投票关闭并建议您依赖项目的错误跟踪
  • 这也不是一个编程问题。

标签: go cryptography sha1 sha256 rclone


【解决方案1】:

我们已设法选择加入这些算法支持并在此处提交 PR:https://github.com/ncw/rclone/pull/3341

注意:由于这些算法被认为是不安全的,您还需要使用现有的 rclone 标志 --sftp-use-insecure-cipher 使它们可用于 SSH 握手。

【讨论】:

    【解决方案2】:

    交互式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
    

    【讨论】:

      猜你喜欢
      • 2018-01-27
      • 1970-01-01
      • 1970-01-01
      • 2012-03-14
      • 1970-01-01
      • 2010-12-10
      • 1970-01-01
      • 1970-01-01
      • 2020-07-06
      相关资源
      最近更新 更多