美文网首页
CentOS系统初始化设置

CentOS系统初始化设置

作者: 凉风儿 | 来源:发表于2017-04-05 16:51 被阅读0次

    步骤

    > ssh root@xxx.xxx.xxx.xxx # 1. 登录系统
    > passwd # 2. 更改root帐号的密码
    > adduser vindicator # 3. 创建一个名为vindicator的用户
    > passwd vindicator # 4. 给vindicator创建登录密码
    > visudo # 5.通过编辑sudoers文件给vindicator赋权
    vindicator    ALL=(ALL)       ALL
    > vi /etc/ssh/sshd_config # 6. 编辑sshd配置文件进行安全加固
    Port 10022 # 更改端口
    Protocol 2
    PermitRootLogin no # 拒绝root登录
    > service sshd reload # 7. 重新加载sshd配置文件
    > ssh -p 10022 vindicator@xxx.xxx.xxx.xxx # 8. 用帐号vindicator通过10022端口登录
    

    参考

    https://mos.meituan.com/library/21/initial-setup-with-centos/

    相关文章

      网友评论

          本文标题:CentOS系统初始化设置

          本文链接:https://www.haomeiwen.com/subject/ojhxattx.html