ssh 公钥登录失败。
最近在迁移一台机器A(原公钥主机),迁移到B主机
把A主机admin 和root下.ssh/id_dsa id_dsa.pub都复制到B主机对应的root和admin的.ssh下
B主机admin用户下登录到任意公钥客户机 admin用户下成功 (ssh admin@ip)
在B主机 root 用户下登录到任意公钥客户机 root用户用内网地址就成功,用外网地址少数几台成功,偶尔几台成功(外网网络连通正常)
ssh -vv 看登录的详细过程停在这阶段(见红色字段)
debug2: key: /root/.ssh/identity (0x0)
debug2: key: /root/.ssh/id_rsa (0x0)
debug2: key: /root/.ssh/id_dsa (0x80195f460)
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Offering public key: /root/.ssh/id_dsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
把A主机admin 和root下.ssh/id_dsa id_dsa.pub都复制到B主机对应的root和admin的.ssh下
B主机admin用户下登录到任意公钥客户机 admin用户下成功 (ssh admin@ip)
在B主机 root 用户下登录到任意公钥客户机 root用户用内网地址就成功,用外网地址少数几台成功,偶尔几台成功(外网网络连通正常)
ssh -vv 看登录的详细过程停在这阶段(见红色字段)
debug2: key: /root/.ssh/identity (0x0)
debug2: key: /root/.ssh/id_rsa (0x0)
debug2: key: /root/.ssh/id_dsa (0x80195f460)
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Offering public key: /root/.ssh/id_dsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
作者: adastudy 发布时间: 2011-03-04
已解决,原A主机的IP和B主机IP对调之后再次ssh ,原本失败的都成功了 - -!
作者: adastudy 发布时间: 2011-03-04