zoukankan      html  css  js  c++  java
  • Ubuntu17 root ssh

    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/

  • 相关阅读:
    。。。。。。
    数据库
    python基础
    。。。。
    drf
    CRM笔记梳理
    人生苦短,我学PYTHON
    React的初步了解
    递归与迭代比较
    有没有大佬会很标准的三层架构
  • 原文地址:https://www.cnblogs.com/autohome7390/p/7527918.html
Copyright © 2011-2022 走看看