安装opie
wget
rpm -ivh opie-24-630src.rpm
cd /usr/src/redhat/SPECS/
rpmbuild -bb opie.spec
//这里好像会报错,删除一行就可以通过
rpm -ivh /usr/src/redhat/RPMS/i386/opie-2.4-630.i386.rpm
opiepasswd -n 1000 -s CentosServer
Updating root:
You need the response from an OTP generator.
New secret pass phrase:
otp-md5 1000 CentosServer
Response: //这里填写winkey算出来的
win下载地址:
修改/etc/ssh/sshd_config
PasswordAuthentication no
ChallengeResponseAuthentication yes
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
UsePAM yes
修改/etc/pam.d/sshd
cat sshd
#%PAM-1.0
auth required /lib/security/pam_opie.so
#增加上一行,注释掉下面一行
#auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
session optional pam_keyinit.so force revoke
session include system-auth
session required pam_loginuid.so
再重启service sshd restart
就完成了,每次都用KEY生成密码就OK了!
阅读(710) | 评论(0) | 转发(0) |