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

Failed to start ssh.service: Unit not found.的更多相关文章

  1. Failed to restart ssh.service: Unit not found.

    环境 操作系统:CentOS 7 问题 重启ssh服务,启动报错:Failed to restart ssh.service: Unit not found. 操作步骤 1. 编辑sshd_confi ...

  2. Failed to stop iptables.service: Unit iptables.service not loaded.

    redhat 7 [root@lk0 ~]# service iptables stop Redirecting to /bin/systemctl stop iptables.service Fai ...

  3. centos7 Failed to start firewalld.service: Unit is masked.

    centos7 启动防火墙失败:Failed to start firewalld.service: Unit is masked.   ---- 刚yum安装了iptables 解决: 执行”sys ...

  4. docker报错:Failed to restart docker.service: Unit not found.

    前言:我之前安装好docker了,但是关机重启后,发现docker就没了 报错:Failed to restart docker.service: Unit not found.   解决方法: 1. ...

  5. [ISSUE] [Centos] Centos Start Nginx Show: Failed to start nginx.service:unit not found

    CMD Line:systemctl start nginx.serviceFailed to start nginx.service: Unit not found. Solution: 1.vim ...

  6. Failed to stop iptables.service: Unit iptables.service not loaded.解决方法

    CentOS7中执行 service iptables start/stop 会报错Failed to start iptables.service: Unit iptables.service fa ...

  7. mysqld服务启动失败, Failed to restart mysqld.service: Unit not found.

    -bash-4.2# service mysqld restart Redirecting to /bin/systemctl restart mysqld.serviceFailed to rest ...

  8. CentOS 7 防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load

    错误信息如下: [root]# service iptables start Redirecting to /bin/systemctl start iptables.service Failed t ...

  9. Failed to start metasploit.service: Unit metasploit.service not found的解释

    不多说,直接上干货! root@kali:~# service metasploit start Failed to start metasploit.service: Unit metasploit ...

随机推荐

  1. Windows 上安装 PostgreSQL

    PostgreSQL官网–>Download–>Windows 64位,如图所示: (1)官网: https://www.postgresql.org/ (2)Download: http ...

  2. C#中的深度学习(五):在ML.NET中使用预训练模型进行硬币识别

    在本系列的最后,我们将介绍另一种方法,即利用一个预先训练好的CNN来解决我们一直在研究的硬币识别问题. 在这里,我们看一下转移学习,调整预定义的CNN,并使用Model Builder训练我们的硬币识 ...

  3. 死磕以太坊源码分析之txpool

    死磕以太坊源码分析之txpool 请结合以下代码阅读:https://github.com/blockchainGuide/ 写文章不易,也希望大家多多指出问题,交个朋友,混个圈子哦 交易池概念原理 ...

  4. Redis不仅仅是缓存,还是……

    你需要一个经典数据库吗? 一段时间以来,巨大数量的数据处理迫使所有的应用程序在数据库层前添加缓存策略.即使经典数据库进行了大量的下划线优化,仍然不能提供足够的速度和可用性.主要原因在于数据存储越远,获 ...

  5. ribbon源码分析

    对于ribbon的使用我们只需要在RestTemplate的申明上面加上 @LoadBalanced 注解之后那么这个RestTemplate就具有了负载均衡的功能 ribbon是怎么实现这一功能的? ...

  6. Java学习_异常处理

    Java的异常 计算机程序运行的过程中,总是会出现各种各样的错误.有一些错误是用户造成的,比如,希望用户输入一个int类型的年龄,但是用户的输入是abc.程序想要读写某个文件的内容,但是用户已经把它删 ...

  7. npm国内淘宝镜像

    理由 由于npm的registry地址是国外的,速度很慢,所以推荐使用淘宝镜像:https://registry.npm.taobao.org 配置方法 临时配置 npm --registry htt ...

  8. 记一次Hadoop安装部署过程

    实验名称:Hadoop安装部署 一.实验环境: 虚拟机数量:3个 (1个master,2个slave:slave01,slave02) 主节点master信息: 操作系统:CentOS7.5 软件包位 ...

  9. 使用sublime text3搭建Python编辑环境

    最近在工作遇到一个难题. 我所在的测试组有一套PC软件前端自动化工程,在进行自动化测试时,需要在一台古老的xp机器上运行,但这台古老的xp机器带给我诸多烦恼,特别是使用Pycharm编辑器时,我遇到了 ...

  10. uber_go_guide解析(一)

    前言 实力有限,guide啃着好费劲 原地址https://github.com/xxjwxc/uber_go_guide_cn 加我自己的体会和补充 基于Golang 1.14 正文 Interfa ...