码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu 16.04 为 root 帐号开启 SSH 登录

时间:2018-11-09 16:29:09      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:ict   ubuntu   账户   su -   服务   install   time   get   perm   

1、安装 open ssh:

sudo apt-get install openssh-server

      修改 root 密码

sudo passwd root

2. 以其他账户登录,通过 sudo nano 修改 /etc/ssh/sshd_config :

   

xxx@ubuntu:~$ su - root   #切换到root账户

Password:                           #输入第二步修改的root密码

root@ubuntu:~# vi /etc/ssh/sshd_config

3、 修改sshd_config为:

 

# Authentication: 

LoginGraceTime 120 

#PermitRootLogin prohibit-password

PermitRootLogin yes 

StrictModes yes

4. 重启 ssh  服务

 

root@ubuntu:~# sudo service ssh restart 

root@ubuntu:~#

 

Ubuntu 16.04 为 root 帐号开启 SSH 登录

标签:ict   ubuntu   账户   su -   服务   install   time   get   perm   

原文地址:https://www.cnblogs.com/Mvloveyouforever/p/9934993.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!