ssh-host-config, 不要privilege user
ssh-keygen, 不设密码
其他采用默认设置
最后
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
从/usr/sbin/sshd启动sshd,不要从windows的service上启动,否则会要输入windows用户的密码
或者,
把/etc/ssh/sshd_config中的PasswordAuthentication 设为 no,并复制id_rsa.pub为authorized_keys
最后,重启ssh服务:
service ssh restart
refer: