免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2358 | 回复: 5
打印 上一主题 下一主题

[安装配置] aix 下公钥和私钥配置失败。已经尝试了N次了 苦就一个字 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-13 04:52 |只看该作者 |倒序浏览
最近要做一个数据的export/scp/load/,从一台server利用Crontab执行export/scp/load/,手动是可以  只是需要输入很多次password, 可是通过crontab就不行,后来发现需要设置公钥和私钥,俺尝试了好几次,都没有成功,还是提示需要输入密码,我也检查了文件的权限,属性,都没有问题。现在只好来找配置文件sshd_config的问题了 请各位帮忙看看问题出在什么地方?aix的版本都是AIX  3 5,
  1. # #       $OpenBSD: sshd_config,v 1.56 2002/06/20 23:37:12 markus Exp $

  2. # This is the sshd server system-wide configuration file.  See
  3. # sshd_config(5) for more information.

  4. # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

  5. # The strategy used for options in the default sshd_config shipped with
  6. # OpenSSH is to specify options with their default value where
  7. # possible, but leave them commented.  Uncommented options change a
  8. # default value.

  9. #Port 22
  10. Protocol 2
  11. #ListenAddress 0.0.0.0
  12. #ListenAddress ::

  13. # HostKey for protocol version 1
  14. HostKey /etc/ssh/ssh_host_key
  15. # HostKeys for protocol version 2
  16. HostKey /etc/ssh/ssh_host_rsa1_key
  17. HostKey /etc/ssh/ssh_host_dsa_key

  18. # Lifetime and size of ephemeral version 1 server key
  19. #KeyRegenerationInterval 3600
  20. KeyRegenerationInterval 3600
  21. #ServerKeyBits 768

  22. # Logging
  23. #obsoletes QuietMode and FascistLogging
  24. #SyslogFacility AUTH
  25. #LogLevel INFO
  26. LogLevel INFO

  27. # Authentication:

  28. #LoginGraceTime 120
  29. LoginGraceTime 120
  30. #PermitRootLogin no
  31. PermitRootLogin without-password
  32. #StrictModes yes
  33. StrictModes yes

  34. #RSAAuthentication yes
  35. RSAAuthentication yes

  36. #PubkeyAuthentication yes
  37. PubkeyAuthentication yes

  38. TCPKeepAlive yes

  39. #AuthorizedKeysFile     .ssh/authorized_keys

  40. # rhosts authentication should not be used
  41. #RhostsAuthentication no
  42. # Don't read the user's ~/.rhosts and ~/.shosts files
  43. #IgnoreRhosts yes
  44. # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
  45. #RhostsRSAAuthentication no
  46. # similar for protocol version 2
  47. #HostbasedAuthentication no
  48. # Change to yes if you don't trust ~/.ssh/known_hosts for
  49. # RhostsRSAAuthentication and HostbasedAuthentication
  50. #IgnoreUserKnownHosts no

  51. # To disable tunneled clear text passwords, change to no here!
  52. #PasswordAuthentication yes
  53. PermitEmptyPasswords no

  54. # Change to no to disable s/key passwords
  55. ChallengeResponseAuthentication no

  56. # Kerberos options
  57. #KerberosAuthentication no
  58. #KerberosOrLocalPasswd yes
  59. #KerberosTicketCleanup yes

  60. #AFSTokenPassing no

  61. # Kerberos TGT Passing only works with the AFS kaserver
  62. #KerberosTgtPassing no

  63. # Set this to 'yes' to enable PAM keyboard-interactive authentication
  64. # Warning: enabling this may bypass the setting of 'PasswordAuthentication'
  65. #PAMAuthenticationViaKbdInt no

  66. X11Forwarding yes
  67. #X11DisplayOffset 10
  68. X11UseLocalhost no
  69. #PrintMotd yes
  70. PrintMotd yes
  71. #PrintLastLog yes
  72. KeepAlive yes
  73. #UseLogin no
  74. #UsePrivilegeSeparation yes
  75. #Compression yes
  76. PermitUserEnvironment no

  77. #MaxStartups 10
  78. MaxStartups 100
  79. # no default banner path
  80. #Banner /some/path
  81. #VerifyReverseMapping no
  82. #DenyUsers root
  83. #AuthorizedKeysFile /dev/null
  84. #DenyUsers
  85. #DenyUsers
  86. #AllowUsers
  87. #AllowUsers
  88. #AllowUsers

  89. # override default of no subsystems
  90. Subsystem       sftp    /usr/sbin/sftp-server
复制代码


以下朋友给的建议,各位觉得他说的对否?
My own personal experience has been that ssh public/private key pairs must be regenerated after an OS upgrade as the server's host key fingerprint (MD5 hash) in the old keys will no longer be valid. If this does not fix the issue, it could be permissions on the key files or ssh configuration for the userid.

[ 本帖最后由 dnavy 于 2007-6-13 04:56 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-06-13 18:15 |只看该作者
没人理我  

论坛徽章:
7
荣誉会员
日期:2011-11-23 16:44:17水瓶座
日期:2013-08-28 21:20:16丑牛
日期:2013-10-02 21:01:462015年迎新春徽章
日期:2015-03-04 09:54:45操作系统版块每日发帖之星
日期:2016-06-05 06:20:0015-16赛季CBA联赛之吉林
日期:2016-06-20 08:24:0515-16赛季CBA联赛之四川
日期:2016-08-18 15:02:02
3 [报告]
发表于 2007-06-13 18:39 |只看该作者
#PermitRootLogin no
注意这一行,如果使用root用户做,那么我建议打开root login的功能。
加入如下一行
PermitRootLogin yes
重启sshd进程,或者kill -1 sshd's processID.

对于ssh来说,如果server端更新或者重装了ssh软件或者系统,那么最好在client端修改$HOME/.ssh/known_hosts中的server端ip所在的条目。
不知道您明白了没有。

论坛徽章:
0
4 [报告]
发表于 2007-06-13 19:01 |只看该作者
不能允许root登陆,我用的是db的instance id
就算server端重新安装了ssh 我把两边的know_host都清空 regenerate ssh key 可以么

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
5 [报告]
发表于 2007-06-13 20:53 |只看该作者
大不了重新来一遍

论坛徽章:
0
6 [报告]
发表于 2007-06-13 23:00 |只看该作者
原帖由 yddll 于 2007-6-13 20:53 发表
大不了重新来一遍



已经重来了n次了   郁闷哦
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP