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