Using one time password with ssh.

With my host being public to internet, security now is the most concerning than it ever was.
So, first step, using one time password when login with ssh.

$ sudo apt-get install libpam-otpw

--- /etc/ssh/sshd_config ---
UsePrivilegeSeparation no
ChallengeResponseAuthentication yes
--- /etc/pam.d/sshd ---
#@include common-auth
auth required pam_otpw.so
session optional pam_otpw.so

~ $ optw-gen # Save the output!
$ sudo /etc/init.d/ssh restart

And here is some other tips:
http://www.ibm.com/developerworks/cn/aix/library/au-sshlocks/index.html?ca=drs-

猜你喜欢

转载自magicloud.iteye.com/blog/832465