ubuntu 系统使用问题

DAY DAY UP 2021年07月13日 204次浏览

修改 root 密码

root 密码默认是空的,需要先用用户登入后进行修改
ubuntu安装好后,root初始密码(默认密码)不知道,需要设置。

先用安装时候的用户登录进入系统
输入:sudo passwd root 回车
输入新密码,重复输入密码,最后提示passwd:password updated sucessfully
此时已完成root密码的设置
输入:su root
切换用户到root试试.......

vi 编辑器使用不顺手,反人类

vi /etc/vim/vimrc.tiny

set compatible
vi /etc/vim/vimrc.tiny

set nocompatible
set backspace=2


无法用户 ssh 工具直接连接 ubuntu

ufw disable
ufw allow 22
apt-get install openssh-server

无法用 root 用户通过 sh 直接连接 ubuntn

sudo vi /etc/ssh/sshd_config

PermitRootLogin prohibit-password 改为

PermitRootLogin yes


重启服务
sudo service ssh restart