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的更多相关文章

  1. Permissions 0664 for '/home/root/.ssh/id_rsa' are too open.

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY @ @@@ ...

  2. root权限下找不到 /root/.ssh目录

    Xshell配置ssh登陆远程服务器,找不到 root/.ssh目录,报错信息如下: root@ubuntu:/home/xinxin# cd /root/.ssh/bash: cd: /root/. ...

  3. Add correct host key in /root/.ssh/known_hosts to get rid of this message

    bug: Add correct host key in /root/.ssh/known_hosts to get rid of this message 解决办法: rm ~/.ssh/known ...

  4. 一直出现 Enter passphrase for key '/root/.ssh/gitkey12.pub'

    案例: 我一下没有设置密码的pub key, 一使用就要求: Enter passphrase for key '/root/.ssh/gitkey12.pub',   原因:本该设置私钥的地方,设置 ...

  5. ssh:Permissions 0644 for ‘/root/.ssh/id_rsa’ are too open

    最近,用ssh连接github时,突然提示“Permissions 0644 for ‘/root/.ssh/id_rsa’ are too open”,并且断开连接. 仔细阅读了一下ssh文档和这句 ...

  6. ansible Failed to connect to the host via ssh: no such identity: /root/.ssh/id_rsa.bak

    中控机和远端主机配置完密钥后,在中控台上通过ansible检测联通性 ansible -i inventory.cfg all -m ping 10.1.1.1 | UNREACHABLE! => ...

  7. linux 限制root SSH登陆和限制su

    linux 限制root用户SSH登录:   1.修改SSHD服务的配置文件/etc/ssh/sshd_config    将#PermitRootLogin yes 改为PermitRootLogi ...

  8. Ubuntu 17.04 允许使用root ssh登录

    用ubuntu 17.04部署完docker后,用winscp去管理系统上的文件发现默认的管理员账号权限不够,想重新用root登录,发现一只被服务器拒绝(permission denied).已经执行 ...

  9. centos7 禁止 root ssh login

    CentOS 7 默认容许任何帐号透过 ssh 登入,包括 root 和一般帐号,为了不让 root 帐号被黑客暴力入侵,我们必须禁止 root 帐号的 ssh 功能,事实上 root 也没有必要 s ...

随机推荐

  1. ThinkPHP处理海量数据分表机制详细代码及说明

    ThinkPHP处理海量数据分表机制详细代码及说明   应用ThinkPHP内置的分表算法处理百万级用户数据. 数据表: house_member_0 house_member_1 house_mem ...

  2. Visual Studio 版本互转工具

    Visual Studio 版本互转工具 http://www.cnblogs.com/flydoos/archive/2011/08/20/2146121.html http://www.cnblo ...

  3. TDiocpCoderTcpServer返回数据记录有条数限制的问题

    TDiocpCoderTcpServer返回数据记录有条数限制的问题 在使用TDiocpCoderTcpServer控件返回查询数据的时候,发现当记录条数超过一定数量的时候(比方有人反试图返回30万条 ...

  4. 【java】乱码处理+编码转化+判断字符串编码方式

    之前有一篇是修改IDE的编码,服务器的编码等处理乱码,但是在所有环境因素上,保证了编码方式之后,也会有前台传递给后台[get方式提交]传递给后台的编码方式是非UTF-8的,也会有例如FTP服务器的编码 ...

  5. Snapdragon profiler连android手机

    oppo11 晓龙660 找一根好用的usb数据线 去设置->开发者选项->usb调试 打开(十分钟会自动关,注意再开开) 去windows cmd ===adb devices 会列出这 ...

  6. 通过案例对SparkStreaming透彻理解三板斧之一

    本节课通过二个部分阐述SparkStreaming的理解: 一.解密SparkStreaming另类在线实验 二.瞬间理解SparkStreaming本质 Spark源码定制班主要是自己做发行版.自己 ...

  7. Android EditText输入字数限制总结(包含中文输入内存溢出的解决方法)

    转载请注明,大飞:http://blog.csdn.net/rflyee/article/details/38856539 限定EditText输入个数的解决方式非常多,可是一般主要考虑两点.也就是处 ...

  8. 说说Linux文件权限那些事儿

    文件全部权 显示文件的全部权 更改文件的全部权 文件的权限 改动文件的权限 用符号表示法改动 用数字表示法改动 使用umask指定默认的文件权限 參考文献 首先我们要知道Linux的标准文件权限和安全 ...

  9. JavaScript | 基础(变量/引用/转换/函数)

    ———————————————————————————————————————————— 变量 全局变量:在函数体外声明,全局可以使用 局部变量:通过关键字var来声明 变量类型 <script ...

  10. KINavigationController使用演示例子

    代码地址如下:http://www.demodashi.com/demo/12905.html 运行效果 实现思路 创建pan手势,添加到页面中,监听手势的动作.重写push的方法,在push之前截图 ...