Centos服务器设置SSH访问的时间限制
时间:2014-02-22 01:46 来源:www.it.net.cn 作者:IT网
如何设置SSH访问的时间限制?
解决方法:
/lib/security/pam_time.so
#%PAM-1.0
auth required pam_stack.so service=system-auth
auth required pam_nologin.so
account required pam_stack.so service=system-auth
account required pam_time.so
password required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
session required pam_limits.so
session optional pam_console.so
services;ttys;users;times
sshd;*;jlim;MoWeWk0800-1700
(责任编辑:IT)
如何设置SSH访问的时间限制?
解决方法:
/lib/security/pam_time.so #%PAM-1.0 auth required pam_stack.so service=system-auth auth required pam_nologin.so account required pam_stack.so service=system-auth account required pam_time.so password required pam_stack.so service=system-auth session required pam_stack.so service=system-auth session required pam_limits.so session optional pam_console.so services;ttys;users;times sshd;*;jlim;MoWeWk0800-1700 |