#!/bin/bash
ssh-keygen
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
ulimit -n 10000
yum install -y ntpdate
ntpdate -u ntp2.aliyun.com
echo "server ntp2.aliyun.com iburst" >> /etc/ntp.conf
echo "server ntp3.aliyun.com iburst" >> /etc/ntp.conf
echo "server ntp4.aliyun.com iburst" >> /etc/ntp.conf
service ntpdate start
chkconfig ntpdate on
service iptables stop
chkconfig iptables off
service ip6tables stop
chkconfig ip6tables off
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
写了个shell脚本(刚装完linux可以执行一下)
最新推荐文章于 2025-12-09 00:02:40 发布
本文介绍如何通过SSH实现免密码登录,并配置系统时间与阿里云NTP服务器同步,包括修改SELinux状态和防火墙设置。适用于系统管理员进行远程管理和时间校准。
3781

被折叠的 条评论
为什么被折叠?



