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. AppCompatActivity与toolbar的结合

    原文:http://www.51itong.net/android-activity-appcompatactivity-toolbar-15750.html 另外一个博客:Android 5.x T ...

  2. 【翻译】自定义 UIViewController Transitions

    原文地址:http://www.shinobicontrols.com/blog/posts/2013/10/03/ios7-day-by-day-day-10-custom-uiviewcontro ...

  3. VS2010中使用命令行參数

    在Linux下编程习惯了使用命令行參数,故使用VS2010时也尝试了一下. 新建项目,c++编敲代码例如以下: #include<iostream> #include<fstream ...

  4. DL380 G6 BIOS刷新方法

    bios下载地址SP44873.exe (5.9 MB) http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.js ...

  5. C++发送HTTP请求---亲测可行(转)

    转自:http://hi.baidu.com/benbearlove/item/1671c23017575825b3c0c53f 环境:xp sp3,vs2008,在静态库中使用 MFC #inclu ...

  6. 怎样在点击li时添加样式,移除兄弟样式

    <style type="text/css"> .add{ color:#ff0} </style> <div> <ul> < ...

  7. ES6/ES2015核心内容(下)

    import export 这两个家伙对应的就是es6自己的module功能. 我们之前写的Javascript一直都没有模块化的体系,无法将一个庞大的js工程拆分成一个个功能相对独立但相互依赖的小工 ...

  8. Solr报错Index locked for write for core '***'. Solr now longer supports forceful unlocking via 'unlockOnStartup'

    unlockOnStartup 告知 Solr 忽略在多线程环境中用来保护索引的锁定机制.在某些情况下,索引可能会由于不正确的关机或其他错误而一直处于锁定,这就妨碍了添加和更新.将其设置为 true ...

  9. springboot集成mybatis-generator

    首先上下成功后的效果: 配置非常简单,我们是通过maven插件来进行的,一共只需要3步: 第一步添加mysql依赖和mysql的maven插件: 由于是非常简单的spring+mysql的原始项目,我 ...

  10. 转: android 内存检测工具 LeakCanary 说明

    http://www.liaohuqiu.net/cn/posts/leak-canary-read-me/ LeakCanary 中文使用说明 10 May 2015 LeakCanary Andr ...