UID825
现金0
在线时间0 小时
注册时间2018-11-21
黑狼菜鸟
- 积分
- 0
|
开局一张图,内容端赖编。
男孩的天职docker从入门到实战语音视频教程
第一课 docker前戏1小时
课程内容
购买呆板,更新内核,开启bbr,安装google authenticator ,长途登录防护
注册账号
http://www.vultr.com/?ref=6911149
更新体系 yum update
更新内核
rpm --import http://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml -y
cat /boot/grub2/grub.cfg
grub2-set-default 'CentOS Linux (4.19.0-1.el7.elrepo.x86_64) 7 (Core)'
reboot
uname -r
设置时区为中国时间
timedatectl set-timezone Asia/Shanghai
安装常用组件
yum install -y groupinstall 'Development Tools' gcc gcc-c++ openssl make automake cmake patch logrotate python-devel libpng-devel libjpeg-devel tree axel wget vim git screen net-tools
开启bbr linux内核>=4.9
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
查抄是否开启bbr
sysctl net.ipv4.tcp_available_congestion_control
sysctl net.ipv4.tcp_congestion_control
假如效果都有 bbr, 则证实你的内核已开启 bbr
lsmod | grep bbr
看到有 tcp_bbr 模块即阐明 bbr 已启动
安装google authenticator双因素身份验证
yum install -y google-authenticator qrencode epel-release
cp /etc/pam.d/sshd /etc/pam.d/sshd.bak
vim /etc/pam.d/sshd
第一行添加:
auth required pam_google_authenticator.so
修改 SSH 设置文件:
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
vim /etc/ssh/sshd_config
添加或修改以下内容:
ChallengeResponseAuthentication yes
然后 wq 生存退出,运行如下下令
google-authenticator
#提示是否要更新验证文件,选择y
#克制利用雷同口令,选择y
#默认动态验证码在30秒内有用,由于客户端和服务器大概会存在时间差,可将时间增长到最长4分钟,是否要这么做:这里选择是n,继承默认30秒
#是否限定实验次数,每30秒只能实验最多3次,这里选择y举行限定
systemctl restart sshd
android 下载地点
输入提供的密钥 基于时间就可以利用了
http://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en
chrome插件
http://chrome.google.com/webstore/detail/gauth-authenticator/ilgcnhelpchnceeipipijaljkblbcobl
win http://winauth.github.io/winauth/index.html
ios 搜刮google-authenticator 就可以找到了 |
上一篇:[系列教程]计划师零代码个人作品集网站制作1:原理/域名/服务器 ...下一篇:马哥教诲2018年Linux第30期视频教程
|