AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1769051
Accepted
Daniel Griscom
Daniel Griscom
Asked: 2023-02-17 06:49:05 +0800 CST2023-02-17 06:49:05 +0800 CST 2023-02-17 06:49:05 +0800 CST

使用非常旧的 openSSH 公钥登录计算机

  • 772

我使用 ssh 公钥登录一台运行 OpenSSH 5.9p1 的非常老旧的 Linux 机器,在过去十年中一切正常。不过最近,我更新了工作机器的操作系统(现在运行的是 OpenSSH 9.0),现在公钥登录失败并出现错误send_pubkey_test: no mutual signature algorithm。我可以使用密码进入,但我需要公钥身份验证才能工作。怎么才能说服两个OpenSSH好好玩呢?

细节:

我可以重新配置任一盒子的 OpenSSH,并创建和添加密钥,但我无法更新任一版本的 OpenSSH。旧的 Linux 机器的安全性相对不重要,我禁用了远程 ssh 到我的工作机器(这是我的笔记本电脑)。

nmap --script ssh2-enum-algos -sV -p 22 WW.XX.YY.ZZ这是我自己的机器和 Linux 机器的输出。两者中都存在的行都标有(*)。首先是我的工作机器:

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 9.0 (protocol 2.0)
| ssh2-enum-algos: 
|   kex_algorithms: (10)
|       curve25519-sha256
|       [email protected]
|       diffie-hellman-group-exchange-sha256 (*)
|       diffie-hellman-group14-sha256
|       diffie-hellman-group16-sha512
|       diffie-hellman-group18-sha512
|       ecdh-sha2-nistp256
|       ecdh-sha2-nistp384
|       ecdh-sha2-nistp521
|       [email protected]
|   server_host_key_algorithms: (4)
|       ecdsa-sha2-nistp256
|       rsa-sha2-256
|       rsa-sha2-512
|       ssh-ed25519
|   encryption_algorithms: (6)
|       aes128-ctr (*)
|       [email protected]
|       aes192-ctr (*)
|       aes256-ctr (*)
|       [email protected]
|       [email protected]
|   mac_algorithms: (10)
|       hmac-sha1 (*)
|       [email protected]
|       hmac-sha2-256 (*)
|       [email protected]
|       hmac-sha2-512 (*)
|       [email protected]
|       [email protected]
|       [email protected] (*)
|       [email protected]
|       [email protected]
|   compression_algorithms: (2)
|       none (*)
|_      [email protected] (*)

现在是 Linux 盒子:

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 5.9p1 (protocol 2.0; HPN-SSH patch 13v11)
| ssh2-enum-algos: 
|   kex_algorithms: (4)
|       diffie-hellman-group-exchange-sha1
|       diffie-hellman-group-exchange-sha256 (*)
|       diffie-hellman-group1-sha1
|       diffie-hellman-group14-sha1
|   server_host_key_algorithms: (2)
|       ssh-dss
|       ssh-rsa
|   encryption_algorithms: (13)
|       3des-cbc
|       aes128-cbc
|       aes128-ctr (*)
|       aes192-cbc
|       aes192-ctr (*)
|       aes256-cbc
|       aes256-ctr (*)
|       arcfour
|       arcfour128
|       arcfour256
|       blowfish-cbc
|       cast128-cbc
|       [email protected]
|   mac_algorithms: (11)
|       hmac-md5
|       hmac-md5-96
|       hmac-ripemd160
|       [email protected]
|       hmac-sha1 (*)
|       hmac-sha1-96
|       hmac-sha2-256 (*)
|       hmac-sha2-256-96
|       hmac-sha2-512 (*)
|       hmac-sha2-512-96
|       [email protected] (*)
|   compression_algorithms: (2)
|       none (*)
|_      [email protected] (*)

建议?(谢谢。)

linux
  • 1 1 个回答
  • 18 Views

1 个回答

  • Voted
  1. Best Answer
    user1686
    2023-02-17T07:14:36+08:002023-02-17T07:14:36+08:00

    当前的 OpenSSH 要求使用基于 SHA2 的签名来完成 RSA 密钥身份验证,而您的服务器仅支持 SHA1 根据原始规范。(“ssh-rsa”密钥格式仍然相同,但现代客户端和服务器额外协商 RSA 签名模式作为一个单独的步骤。)

    目前,OpenSSH 仍然支持 RSA-SHA1,但默认情况下是禁用的;ssh -o您可以使用或选项在客户端机器上启用它.ssh/config:

    PubkeyAcceptedAlgorithms +ssh-rsa
    

    在大多数情况下,您还需要客户端在验证其主机密钥时接受来自服务器的 RSA-SHA1 签名:

    HostKeyAlgorithms +ssh-rsa
    

    如果需要,您可以通过将以下内容添加到客户端的 .ssh/config 来将这些安全性较低的选项限制为一组特定的机器:

    Host 10.3.4.*
         PubkeyAcceptedAlgorithms +ssh-rsa
         HostKeyAlgorithms +ssh-rsa
    

    对于更老的系统,使用 PuTTY——它的plinkCLI SSH 客户端几乎可以连接到任何东西。

    • 2

相关问题

  • 如何让我的 Linux 机器看起来像是在运行 Windows?

  • 对于 cp 或 mv,是否有等同于 cd - 的东西?

  • 以 root 身份运行 docker 容器

  • 如何在域和 Linux 活动目录中启用指纹传感器

  • 如何在CentOS 7 中将Ctrl+C 永久更改为Ctrl+K?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve