VPS基础使用配置

VPS 基础使用

1.Debian/Ubuntu 系统安装下载工具
1
apt update -y&&apt install -y curl&&apt install -y socat
2.CentOS 系统安装下载工具
1
2
yum update -y 
yum install curl wget -y
3. 修改VPS允许 root 登录
1
2
3
4
5
6
sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config
sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config
sed -i 's/^#\?RSAAuthentication.*/RSAAuthentication yes/g' /etc/ssh/sshd_config
sed -i 's/^#\?PubkeyAuthentication.*/PubkeyAuthentication yes/g' /etc/ssh/sshd_config
rm -rf /etc/ssh/sshd_config.d/* && rm -rf /etc/ssh/ssh_config.d/*
/etc/init.d/ssh* restart
4.开启BBR加速
1
2
3
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p