LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1507|回复: 7

openssh里能否实现public key+passwd的双重认证??

[复制链接]
发表于 2005-7-9 11:41:11 | 显示全部楼层 |阅读模式
怎么设?谢了。就是先key认证后再passwd认证。
发表于 2005-7-9 15:46:30 | 显示全部楼层
好像没有这个功能,除非你修改源代码
回复 支持 反对

使用道具 举报

发表于 2005-7-14 16:59:33 | 显示全部楼层
这个要通过PAM来实现吧
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-7-14 17:26:28 | 显示全部楼层
pam怎么弄?有人能说一下细的步骤吗?
回复 支持 反对

使用道具 举报

发表于 2005-7-17 22:57:23 | 显示全部楼层
不可以,要密码就没public key
回复 支持 反对

使用道具 举报

发表于 2005-7-21 08:13:24 | 显示全部楼层
给密钥加个password试试~~
回复 支持 反对

使用道具 举报

发表于 2005-7-22 06:21:50 | 显示全部楼层
Post by dancingpig
不可以,要密码就没public key


是吗?


  1. debug1: Remote protocol version 2.0, remote software version OpenSSH_4.1p1 Debian-6ubuntu1
  2. debug1: match: OpenSSH_4.1p1 Debian-6ubuntu1 pat OpenSSH*
  3. debug1: Enabling compatibility mode for protocol 2.0
  4. debug1: Local version string SSH-2.0-OpenSSH_3.9p1 Debian-1ubuntu2
  5. debug1: SSH2_MSG_KEXINIT sent
  6. debug1: SSH2_MSG_KEXINIT received
  7. debug1: kex: server->client aes128-cbc hmac-md5 none
  8. debug1: kex: client->server aes128-cbc hmac-md5 none
  9. debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
  10. debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
  11. debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
  12. debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
  13. debug1: Host 'ubuntu' is known and matches the RSA host key.
  14. debug1: Found key in /home/yongjian/.ssh/known_hosts:34
  15. debug1: ssh_rsa_verify: signature correct
  16. debug1: SSH2_MSG_NEWKEYS sent
  17. debug1: expecting SSH2_MSG_NEWKEYS
  18. debug1: SSH2_MSG_NEWKEYS received
  19. debug1: SSH2_MSG_SERVICE_REQUEST sent
  20. debug1: SSH2_MSG_SERVICE_ACCEPT received
  21. debug1: Authentications that can continue: publickey,keyboard-interactive
  22. [color=Red]debug1: Next authentication method: publickey[/color]
  23. debug1: Trying private key: /home/yongjian/.ssh/identity
  24. debug1: Trying private key: /home/yongjian/.ssh/id_rsa
  25. debug1: Offering public key: /home/yongjian/.ssh/id_dsa
  26. debug1: Authentications that can continue: publickey,keyboard-interactive
  27. [color=Red]debug1: Next authentication method: keyboard-interactive
  28. Password:[/color]
复制代码

好象是先验证用public key,然后再用password的吧。。。
回复 支持 反对

使用道具 举报

发表于 2005-7-22 22:21:42 | 显示全部楼层
Post by yongjian
是吗?


  1. debug1: Remote protocol version 2.0, remote software version OpenSSH_4.1p1 Debian-6ubuntu1
  2. debug1: match: OpenSSH_4.1p1 Debian-6ubuntu1 pat OpenSSH*
  3. debug1: Enabling compatibility mode for protocol 2.0
  4. debug1: Local version string SSH-2.0-OpenSSH_3.9p1 Debian-1ubuntu2
  5. debug1: SSH2_MSG_KEXINIT sent
  6. debug1: SSH2_MSG_KEXINIT received
  7. debug1: kex: server->client aes128-cbc hmac-md5 none
  8. debug1: kex: client->server aes128-cbc hmac-md5 none
  9. debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
  10. debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
  11. debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
  12. debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
  13. debug1: Host 'ubuntu' is known and matches the RSA host key.
  14. debug1: Found key in /home/yongjian/.ssh/known_hosts:34
  15. debug1: ssh_rsa_verify: signature correct
  16. debug1: SSH2_MSG_NEWKEYS sent
  17. debug1: expecting SSH2_MSG_NEWKEYS
  18. debug1: SSH2_MSG_NEWKEYS received
  19. debug1: SSH2_MSG_SERVICE_REQUEST sent
  20. debug1: SSH2_MSG_SERVICE_ACCEPT received
  21. debug1: Authentications that can continue: publickey,keyboard-interactive
  22. [color=Red]debug1: Next authentication method: publickey[/color]
  23. debug1: Trying private key: /home/yongjian/.ssh/identity
  24. debug1: Trying private key: /home/yongjian/.ssh/id_rsa
  25. debug1: Offering public key: /home/yongjian/.ssh/id_dsa
  26. debug1: Authentications that can continue: publickey,keyboard-interactive
  27. [color=Red]debug1: Next authentication method: keyboard-interactive
  28. Password:[/color]
复制代码

好象是先验证用public key,然后再用password的吧。。。


啊,难道偶记错了?我去看看484我看的配置把password关了先~~~~寒个~
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表