ubuntu 开启root远程登录与设置时区东八区【北京时间】

114 阅读1分钟

ubuntu 开启root远程登录与设置时区东八区【北京时间】

开启root登录

Ubuntu默认情况不允许root登录,如有实际需求要用root用户远程连接ssh,则需要设置root密码,并且编辑修改文件: /etc/ssh/sshd_config

#vim  /etc/ssh/sshd_config
#32      PermitRootLogin   yes
#56      PasswordAuthentication   yes

#    sudo    -i   或 sudo   su     切换root身份
#  passwd  xxxxxx 修改root密码

重启生效
#   systemctl  restart  sshd    重启服务

安装ubuntu完毕后设置时区东八区【北京时间】

#   timedatectl   set-timezone   "Asia/Shanghai"