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

Ubuntu17 root ssh

时间:2017-09-15 20:16:44      阅读:380      评论:0      收藏:0      [点我收藏+]

标签:man   root账户   wal   after   passwd   sudo   security   loading   util   

Ubuntu provides OpenSSH (OpenBSD Secure Shell) in its universe repositories, which is a suite of security-related network-level utilities based on the SSH protocol.

1. To install it, open terminal (Ctrl+Alt+T) or log in Ubuntu server and run command:

sudo apt-get install openssh-server

技术分享

 

2. After that, you should have SSH service enabled in your system, you may check its status by running command:

sudo service ssh status

技术分享

 

3. You may change some settings (e.g., the listening port, and root login permission) by editing the configuration file via command:

sudo nano /etc/ssh/sshd_config

On Ubuntu desktop, you may use gedit instead of nano:  add this command in file

PermitRootLogin yes 
StrictModes yes

技术分享

 

Finally apply the changes by restarting or reloading SSH:

sudo service ssh restart

  

以上内容完全盗版自:

http://ubuntuhandbook.org/index.php/2016/04/enable-ssh-ubuntu-16-04-lts/

在这里郑重的说一句,盗版要盗全套,哈哈哈~~~

 

由于不习惯使用非root用户,直接启用root账户方法:

1、修改root 密码:

sudo passwd root

输入两次root用户密码

2、创建 /etc/lightdm/lightdm.conf 

vi /ect/lightdm/lightdm.conf

输入一下内容:

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
greeter-show-manual-login=true

3、重启系统

4、用root登录桌面后,会弹出 读取/root/.profile时发现错误:mesg:ttyname failed:对设备不适当的ioctl操作 信息,解决办法:

将/root/.profile文件中的mesg n

替换成tty -s && mesg n

技术分享

5、重启。

技术分享

 

参考文章:

http://www.configserverfirewall.com/ubuntu-linux/enable-ubuntu-desktop-root-login/

 

Ubuntu17 root ssh

标签:man   root账户   wal   after   passwd   sudo   security   loading   util   

原文地址:http://www.cnblogs.com/autohome7390/p/7527918.html

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