我不能从客户端“A”通过 ssh 到服务器“B”(但我可以从同一子网中的许多其他 ssh 客户端而不是“A”——都是 *nux 机器)
serverA>ssh -v -p 端口用户@serverB
OpenSSH_5.3p1 Debian-3ubuntu5, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to serverB [serverB] port PORT.
debug1: Connection established.
debug1: identity file /home/user_A/.ssh/id_rsa type -1
debug1: identity file /home/user_A/.ssh/id_dsa type 2
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5
debug1: match: OpenSSH_5.1p1 Debian-5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: checking without port identifier
Host key verification failed.
我已经在客户端 A 上检查了以下这些点 - 因为服务器 A 看起来很重要 - :
- user_A/.ssh 目录权限:700(见 man ssh)
- user_A/.ssh/known_hosts 权限:644(见 man ssh)
- user_A/.ssh/known_hosts:不内容 serverB 托管公钥
- otherusers/.ssh/known_hosts:不内容 serverB 托管公钥
我试过了 :
- 删除服务器 A 上的 known_hosts:仍然存在相同的错误
- 清空服务器 A 上的 known_hosts:同样的错误
- 检查主机密钥名称是否与 ssh 服务器配置匹配:ok (HostKey /etc/ssh/ssh_host_rsa_key)
- 重新生成服务器 B 主机密钥(ssh-keygen -t dsa/rsa -f /etc/ssh/ssh_host_dsa/rsa_key):同样的错误
- serverB 上的 ssh -p PORT me@localhost:它也像其他 ssh 客户端一样工作
所以我现在真的很累!ssh 专家欢迎回家。
提前谢谢