【问题标题】:ssh change default authenticationssh 更改默认身份验证
【发布时间】:2021-02-05 11:28:39
【问题描述】:

当我尝试访问启用了 ssh 的路由器时,它会这样说:

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

为了解决这个问题,我可以执行以下命令强制ssh使用路由器使用的认证方式

ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -c aes128-cbc -l <username> 10.10.10.5

有什么方法可以配置 ssh 以默认使用该身份验证。谢谢

【问题讨论】:

  • 路由器本身不会关心 SSH 身份验证;它只会根据其路由表将数据包传递到下一个主机。您似乎在某处使用了ProxyCommand 选项。

标签: ubuntu ssh router cisco


【解决方案1】:

您可以编辑~/.ssh/config并添加主机IP和密码信息。在你的情况下,它应该说明:

Host 101.16.16.2
    KexAlgorithms +diffie-hellman-group1-sha1
    Ciphers aes128-cbc

【讨论】:

    猜你喜欢
    • 2018-01-19
    • 1970-01-01
    • 1970-01-01
    • 2015-01-15
    • 2017-10-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-09
    相关资源
    最近更新 更多