#!/bin/bash
#允许以root登陆ssh
:<<!
echo -e "\033[31m 修改规则,允许root远程登录 \033[0m"
cat >> /etc/ssh/sshd_config << EOF
PasswordAuthentication yes
PermitRootLogin yes
EOF
service ssh restart
!
#配置源
echo -e "\033[31m 配置华为源(已自动备份) \033[0m"
mv /etc/apt/sources.list /etc/apt/sources.list.debian10shback
cat>/etc/apt/sources.list<<EOF
deb http://mirrors.huaweicloud.com/debian/ buster main
deb-src http://mirrors.huaweicloud.com/debian/ buster main
deb http://mirrors.huaweicloud.com/debian/ buster-updates main
deb-src http://mirrors.huaweicloud.com/debian/ buster-updates main
EOF
apt-get update
echo -e "\033[31m 完成\n\n\n \033[0m"
#安装常用工具
echo -e "\033[31m 安装常用工具 \033[0m"
apt-get install git vim -y
echo -e "\033[31m 完成\n\n\n \033[0m"