一般来说,使用ssh远程登陆服务器,只需要输入账号和密码,显然这种方式不是很安全。为了安全着想,可以使用GoohleAuthenticator(谷歌身份验证器),以便在账号和密码之间在增加一个验证码,只有输入正确的验证码之后,在输入密码才能登陆。这样就增强了ssh登陆的安全性。账号、验证码、密码三者缺一个都不能登陆,即使账号和密码正确,验证码错误,同样登陆失败。其中,验证码是动态验证码,并且是通过手机客户端自动获取(默认每隔30秒失效一次)
一、关闭SELINUX
[root@ localhost~]# vim /etc/selinux/config #永久关闭。需要reboot重启后生效
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes