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

RHEL 9与CentOS 6服务器SFTP/SSH双向连接故障及libcrypto报错求助

RHEL 9与CentOS 6服务器SFTP/SSH双向连接故障及libcrypto报错求助

我最近在做服务器升级迁移,需要从新部署的RHEL 9服务器连接到老的CentOS 6服务器,通过SFTP把旧服务器上的用户文件复制过来,之后就可以退役这台CentOS 6机器了。但不管是从RHEL 9连CentOS 6,还是反过来连接,都遇到了SSH报错,折腾半天没搞定,来求助大家!

从RHEL 9连接CentOS 6时的报错

执行命令 ssh -v ewessel@10.30.1.250 后,最后出现libcrypto相关错误,完整调试输出如下:

[ewessel@ftp ~]$ ssh -v ewessel@10.30.1.250

OpenSSH_8.7p1, OpenSSL 3.0.1 14 Dec 2021

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf

debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config

debug1: configuration requests final Match pass

debug1: re-parsing configuration

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf

debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config

debug1: Connecting to 10.30.1.250 [10.30.1.250] port 22.

debug1: Connection established.

debug1: identity file /home/ewessel/.ssh/id_rsa type -1

debug1: identity file /home/ewessel/.ssh/id_rsa-cert type -1

debug1: identity file /home/ewessel/.ssh/id_dsa type -1

debug1: identity file /home/ewessel/.ssh/id_dsa-cert type -1

debug1: identity file /home/ewessel/.ssh/id_ecdsa type -1

debug1: identity file /home/ewessel/.ssh/id_ecdsa-cert type -1

debug1: identity file /home/ewessel/.ssh/id_ecdsa_sk type -1

debug1: identity file /home/ewessel/.ssh/id_ecdsa_sk-cert type -1

debug1: identity file /home/ewessel/.ssh/id_ed25519 type -1

debug1: identity file /home/ewessel/.ssh/id_ed25519-cert type -1

debug1: identity file /home/ewessel/.ssh/id_ed25519_sk type -1

debug1: identity file /home/ewessel/.ssh/id_ed25519_sk-cert type -1

debug1: identity file /home/ewessel/.ssh/id_xmss type -1

debug1: identity file /home/ewessel/.ssh/id_xmss-cert type -1

debug1: Local version string SSH-2.0-OpenSSH_8.7

debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3

debug1: compat_banner: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000002

debug1: Authenticating to 10.30.1.250:22 as 'ewessel'

debug1: load_hostkeys: fopen /home/ewessel/.ssh/known_hosts2: No such file or directory

debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory

debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory

debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received

debug1: kex: algorithm: diffie-hellman-group-exchange-sha256

debug1: kex: host key algorithm: ssh-rsa

debug1: kex: server->client cipher: aes256-ctr MAC: hmac-sha2-256 compression: none

debug1: kex: client->server cipher: aes256-ctr MAC: hmac-sha2-256 compression: none

debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32

debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32

debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<8192<8192) sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

debug1: SSH2_MSG_KEX_DH_GEX_GROUP received

debug1: SSH2_MSG_KEX_DH_GEX_INIT sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY

debug1: SSH2_MSG_KEX_DH_GEX_REPLY received

debug1: Server host key: ssh-rsa SHA256:nMDl3BNpsOOJ6gyMudi6szQS3Pchxe2Ttmj1dH9fLB8

debug1: load_hostkeys: fopen /home/ewessel/.ssh/known_hosts2: No such file or directory

debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory

debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory

debug1: Host '10.30.1.250' is known and matches the RSA host key.

debug1: Found key in /home/ewessel/.ssh/known_hosts:1

ssh_dispatch_run_fatal: Connection to 10.30.1.250 port 22: error in libcrypto

从CentOS 6连接RHEL 9时的报错

执行命令 ssh -v ewessel@10.30.1.225 后,出现 no hostkey alg 错误,完整调试输出如下:

[ewessel@ftp ~]$ ssh -v ewessel@10.30.1.225

OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: Applying options for *

debug1: Connecting to 10.30.1.225 [10.30.1.225] port 22.

debug1: Connection established.

debug1: identity file /home/ewessel/.ssh/identity type -1

debug1: identity file /home/ewessel/.ssh/identity-cert type -1

debug1: identity file /home/ewessel/.ssh/id_rsa type -1

debug1: identity file /home/ewessel/.ssh/id_rsa-cert type -1

debug1: identity file /home/ewessel/.ssh/id_dsa type -1

debug1: identity file /home/ewessel/.ssh/id_dsa-cert type -1

debug1: identity file /home/ewessel/.ssh/id_ecdsa type -1

debug1: identity file /home/ewessel/.ssh/id_ecdsa-cert type -1

debug1: Remote protocol version 2.0, remote software version OpenSSH_8.7

debug1: match: OpenSSH_8.7 pat OpenSSH*

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_5.3

debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received

debug1: kex: server->client aes128-ctr hmac-sha1 none

debug1: kex: client->server aes128-ctr hmac-sha1 none

no hostkey alg

有没有朋友能帮忙分析下这两个报错的原因,以及怎么解决才能让这两台机器正常建立SSH/SFTP连接,完成文件迁移呢?

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.23 09:32:42