TA的每日心情 | 开心 2024-1-19 14:48 |
---|
签到天数: 17 天 [LV.4]偶尔看看III
管理员
- 积分
- 1007
|
为了跑鸿蒙, 选择 windows + ubuntu 双系统模式 , 需配置 SSH 登录 ubuntu , 发现 root 登录输入密码后显示 access denied
解决办法:
1. vim /etc/ssh/sshd_config
找到
#PermitRootLogin prohibit-password
改成
PermitRootLogin yes
:wq 保存退出
2.重启ssh
service sshd restart
效果:
- ┌──────────────────────────────────────────────────────────────────────┐
- │ • MobaXterm Personal Edition v21.2 • │
- │ (SSH client, X server and network tools) │
- │ │
- │ ➤ SSH session to root@192.168.1.204 │
- │ • Direct SSH : ✔ │
- │ • SSH compression : ✔ │
- │ • SSH-browser : ✔ │
- │ • X11-forwarding : ✔ (remote display is forwarded through SSH) │
- │ │
- │ ➤ For more info, ctrl+click on help or visit our website. │
- └──────────────────────────────────────────────────────────────────────┘
- Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-26-generic x86_64)
- * Documentation: https://help.ubuntu.com
- * Management: https://landscape.canonical.com
- * Support: https://ubuntu.com/advantage
- 0 updates can be applied immediately.
- The programs included with the Ubuntu system are free software;
- the exact distribution terms for each program are described in the
- individual files in /usr/share/doc/*/copyright.
- Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
- applicable law.
- root@turingkuang:~# ls
- Desktop Documents Downloads Music Pictures Public Templates thinclient_drives Videos
复制代码
|
|