SSH无法使用root用户进行登陆的解决方法
问题:使用MobaXterm软件,SSH以root身份进行登陆时,提示“access deny”。
解决步骤:
(1)打开ssh配置文件/etc/ssh/sshd_config中;
(2)在 #PermitRootLogin prohibit-password 这行的后面,添加下面内容:
PermitRootLogin yes
(3)然后退出保存,重启ssh服务:
book@100ask:~$ /etc/init.d/ssh restart
[....] Restarting ssh (via systemctl): ssh.service==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'ssh.service'.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===
. ok
book@100ask:~$