ssh 连接到服务器时出现“签名不正确”

ssh 连接到服务器时出现“签名不正确”

我有一台服务器,我通常从多台笔记本电脑(一些 FC22、FC23 或 ubuntu)连接到该服务器。我安装了一台全新的笔记本电脑 FC23,在 authorized_keys 中添加了相关密钥等:

[mathieu@xps13 code]$ ssh -vvv root@ovh6
OpenSSH_7.2p2, OpenSSL 1.0.2g-fips  1 Mar 2016
debug1: Reading configuration data /home/mathieu/.ssh/config
debug1: /home/mathieu/.ssh/config line 5: Applying options for *
debug1: /home/mathieu/.ssh/config line 71: Applying options for ovh6
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug2: resolving "XXXXXXXXXXXXXXX" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to XXXXXXXXXXXXXXX [YYYYYYYYYYYY] port 22.
debug1: Connection established.
debug1: identity file /home/mathieu/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mathieu/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mathieu/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mathieu/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mathieu/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mathieu/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mathieu/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mathieu/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.9
debug1: match: OpenSSH_6.9 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to ns427784.ip-37-187-149.eu:22 as 'root'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa,[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1
debug2: host key algorithms: ssh-rsa
debug2: ciphers ctos: [email protected],[email protected],aes256-ctr,aes128-ctr
debug2: ciphers stoc: [email protected],[email protected],aes256-ctr,aes128-ctr
debug2: MACs ctos: [email protected],[email protected],[email protected],hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
debug2: MACs stoc: [email protected],[email protected],[email protected],hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: [email protected] compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: [email protected] compression: none
debug1: kex: diffie-hellman-group-exchange-sha256 need=16 dh_need=16
debug1: kex: diffie-hellman-group-exchange-sha256 need=16 dh_need=16
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<3072<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug2: bits set: 1541/3072
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:3dFTH1Rbkf+Y4PyYWfyPFkmZoxepgsdJnKgSikaSqEs
debug3: hostkeys_foreach: reading file "/home/mathieu/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file /home/mathieu/.ssh/known_hosts:4
debug3: load_hostkeys: loaded 1 keys from XXXXXXX
debug3: hostkeys_foreach: reading file "/home/mathieu/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file /home/mathieu/.ssh/known_hosts:4
debug3: load_hostkeys: loaded 1 keys from 37.187.149.109
debug1: Host 'XXXXXXXXXXXX' is known and matches the RSA host key.
debug1: Found key in /home/mathieu/.ssh/known_hosts:4
debug2: bits set: 1569/3072
ssh_dispatch_run_fatal: Connection to XXXXXXXXXXXXXXX port 22: incorrect signature

更多信息:我可以使用代理转发连接到此服务器,通过在另一台服务器上弹跳,确认客户端 priv/pub 身份验证密钥没有问题。我还发现这台笔记本电脑和出故障的笔记本电脑之间的唯一区别是 openssh 版本(7.1p2 = 工作,7.2p2 = 失败)。也就是说,在我在工作笔记本电脑上运行 dnf update 后,它开始失败... 报告为 fedora bugzilla 中的错误。适用于 FC23。

现在,这个问题让我困惑:我仍然可以从另一台 FC23 笔记本电脑进行连接,我可能做错了什么?

答案1

据报道错误 #1332082,这是opensshFedora 22 中的一个错误。

简而言之,在使用时,服务器(在 Fedora 22 中)对与客户端(在 Fedora 23 中)预期openssh-6.9p1不同的数据进行签名openssh-7.2diffie-hellman-group-exchange-sha256。修复已在菩提并正在进行 Fedora 22 更新。

感谢您的报告。

相关内容