1. #!/bin/bash
    2. #允许以root登陆ssh
    3. :<<!
    4. echo -e "\033[31m 修改规则,允许root远程登录 \033[0m"
    5. cat >> /etc/ssh/sshd_config << EOF
    6. PasswordAuthentication yes
    7. PermitRootLogin yes
    8. EOF
    9. service ssh restart
    10. !
    11. #配置源
    12. echo -e "\033[31m 配置华为源(已自动备份) \033[0m"
    13. mv /etc/apt/sources.list /etc/apt/sources.list.debian10shback
    14. cat>/etc/apt/sources.list<<EOF
    15. deb http://mirrors.huaweicloud.com/debian/ buster main
    16. deb-src http://mirrors.huaweicloud.com/debian/ buster main
    17. deb http://mirrors.huaweicloud.com/debian/ buster-updates main
    18. deb-src http://mirrors.huaweicloud.com/debian/ buster-updates main
    19. EOF
    20. apt-get update
    21. echo -e "\033[31m 完成\n\n\n \033[0m"
    22. #安装常用工具
    23. echo -e "\033[31m 安装常用工具 \033[0m"
    24. apt-get install git vim -y
    25. echo -e "\033[31m 完成\n\n\n \033[0m"