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. [C#] (原创)进度等待窗口(附:自定义控件的使用)

    一.前言 技术没有先进与落后,只有合适与不合适. 在程序当中,经常有耗时较长的操作,为了给用户更好的体验,就需要给用户一个及时的反馈,这种时候就需要用到进度等待窗口. 实现进度等待窗口的技术有很多,比 ...

  2. MVC中使用T4模板

    参考博文 http://www.cnblogs.com/heyuquan/archive/2012/07/26/2610959.html 图片释义 1.简单示例,对基本的模块标记 2.根据上图生成的类 ...

  3. junit 测试用例多并发

    最近再用测试用例写个多并发,但是测试用例一运行完程序就结束啦.还没有等到多线程运行完.这个时候可以用断点在多线程后面停住或者让主线程睡眠多一些

  4. 在Ubuntu14.04下配置Samba 完成linux和windows之间的文件共享

    在Windows和Linux之间传递文件可以使用Samba服务.下面是安装步骤: 1. 安装Samba. sudo apt-get install samba 2. 修改配置文件 sudo gedit ...

  5. eclipse的相关操作和使用快捷键

    修改字体Window->preferences->General->Appearance->ColorsandFonts ->Basic->text Font 在e ...

  6. springboot项目父依赖管理

    springboot项目,pom文件中,要引用父pom文件,进而使用其依赖关系 例如: <parent> <groupId>org.springframework.boot&l ...

  7. c通过ctfshow学习php反序列化

    web254 web255 web256 web257 web258 web259 web260 web262 web263 web264 web265 web266 web254 error_rep ...

  8. Hbase Rowkey设计原则

    Hbase是三维有序存储的,通过rowkey(行键),column key(column family和qualifier)和TimeStamp(时间戳)这三个维度可以对HBase中的数据进行快速定位 ...

  9. linq to entity不识别方法"System.String ToString()"

    将班级id以字符串形式输入如:"1111,1112,1113".数据库里的id为int型,在数据路里找到匹配的相应班级转换成列表.在这里爆出问题:不识别方法"System ...

  10. Java并发编程实战(3)- 互斥锁

    我们在这篇文章中主要讨论如何使用互斥锁来解决并发编程中的原子性问题. 目录 概述 互斥锁模型 互斥锁简易模型 互斥锁改进模型 Java世界中的互斥锁 synchronized中的锁和锁对象 synch ...