注意事项

一、输入ifconfig提示Command 'ifconfig' not found

  打开终端输入:sudo apt install net-tools

二、开启root账户登录

  1、首先设置root账户的密码:sudo passwd root

  2、切换账户为root:su root

  3、用vi打开 /etc/pam.d/gdm-autologin和/etc/pam.d/gdm-password,将文件中的auth required pam_succeed_if.so user != root quiet_success注释掉

  4、打开 /root/.profile 将最后一行的mesg n 2> /dev/null || true修改为tty -s && mesg n || true(如没有则不用修改)

       5、vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf文件末尾新增greeter-show-manual-login=true all-guest=false

三、开启ssh服务

  1、安装openssh-server软件包:

    sudo apt update

    sudo apt install openssh-server 

  2设置root用户ssh登录

修改配置文件: /etc/ssh/sshd_config
# Authentication:  
# LoginGraceTime 2m  
# PermitRootLogin prohibit-password  
# StrictModes yes
更换为
# Authentication:  
LoginGraceTime 120  
#PermitRootLogin prohibit-password  
PermitRootLogin yes  
StrictModes yes
在最后加上如下代码
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1

   3、重启reboot

原文地址:https://www.cnblogs.com/guodanzhen/p/13229068.html