Failed to start ssh.service: Unit not found.
報錯內容:
[Centos7@localhost ~]$ service ssh start
Redirecting to /bin/systemctl start ssh.service
Failed to start ssh.service: Unit not found.
xshell遠程連接Vmware時,連接不上,查看Centos 7 終端,顯示Unit not found.
解決辦法:
OpenSSH Server的默認設置是拒絕root用戶基於密碼的登錄,並且僅允許基於密鑰的登錄。需更更改這部分設定,sshd默認設置在
/etc/ssh/sshd_config中,對以下部分進行修改:PermitRootLogin yes然后重啟服務:restart the SSH server
sudo service ssh restart注意:上面是Centos6的重啟命令,Centos7的是:
systemctl restart sshd
