首页 > 系统服务 > 详细

Ubuntu Server系统基础配置

时间:2020-06-26 18:47:30      阅读:64      评论:0      收藏:0      [点我收藏+]

Ubuntu Server系统基础配置

 1:更改主机名:

技术分享图片
1 ~$ cat /etc/hostname
2 ubuntu-node.example.com
View Code

2:配置root远程登录

默认情况下,ubuntu不允许root用戶远程ssh,如果有实际场景需要允许root用戶远程ssh,则需要设置root密码,并且编辑/etc/ssh/sshd_config文件修改如下

 

~$ sudo vim  /etc/ssh/sshd_config
32#PermitRootLogin prohibit-password #默认为禁止登录
33 PermitRootLogin yes#改为允许登录

57#PasswordAuthentication yes
58 PasswordAuthentication yes#打开密码认证,其实默认就是允许通过密码认证登录~

$ sudosu- root #切换到root用戶环境
~# passwd  #设置密码Enter new UNIX 
password:Retype new UNIX password:
passwd: password updated successfully

~# systemctl  restart  sshd #重启ssh服务并测试root用戶远程ssh连接

  

 

 
 

Ubuntu Server系统基础配置

原文:https://www.cnblogs.com/molson/p/13195849.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!