banner
DarianBlog

DarianBlog

达里安博客-专注于技术分享与交流的博客。博客致力于创造一个简单而直接的技术学习平台。
email

Change key login to root password login in Ubuntu.

Switch to the root user:

sudo -i

Edit the configuration file:

vim /etc/ssh/sshd_config

Modify the parameter:

Change "no" after PermitRootLogin to "yes"

Modify the parameter:

Change "no" after PasswordAuthentication to "yes"

Set the root password:

passwd

Restart the ssh service:

systemctl restart ssh

Note: X=delete the # sign, W=move the cursor to the next word, DW=delete the word after the cursor, A=enter edit mode, esc=exit edit mode, slash "/" + string=find
After editing, enter :wq to save and exit, then restart the ssh service

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.